Class UdpHandler
java.lang.Object
org.opendaylight.openflowjava.protocol.impl.core.UdpHandler
- All Implemented Interfaces:
Runnable,OnlineProvider,ServerFacade,ShutdownProvider
Class implementing server over UDP for handling incoming connections.
- Author:
- michal.polkorab
-
Constructor Summary
ConstructorsConstructorDescriptionUdpHandler(int port, Runnable readyRunnable) Constructor of UdpHandler that listens on selected port.UdpHandler(InetAddress address, int port, Runnable readyRunnable) Constructor of UdpHandler that listens on selected address and port. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.util.concurrent.ListenableFuture<Boolean>intgetPort()protected voidinitiateEpollEventLoopGroups(ThreadConfiguration threadConfiguration) Initiate Epoll event loop groups with Nio as fall back.voidinitiateEventLoopGroups(ThreadConfiguration threadConfiguration, boolean isEpollEnabled) Initiate event loop groups.voidinitiateNioEventLoopGroups(ThreadConfiguration threadConfiguration) Initiate Nio event loop groups.voidrun()voidsetChannelInitializer(UdpChannelInitializer channelInitializer) voidsetThreadConfig(ThreadConfiguration threadConfig) Sets thread configuration.com.google.common.util.concurrent.ListenableFuture<Boolean>shutdown()
-
Constructor Details
-
UdpHandler
Constructor of UdpHandler that listens on selected port.- Parameters:
port- listening port of UdpHandler server
-
UdpHandler
Constructor of UdpHandler that listens on selected address and port.- Parameters:
address- listening address of UdpHandler serverport- listening port of UdpHandler server
-
-
Method Details
-
run
public void run() -
shutdown
- Specified by:
shutdownin interfaceShutdownProvider
-
getIsOnlineFuture
- Specified by:
getIsOnlineFuturein interfaceOnlineProvider
-
getPort
public int getPort() -
setChannelInitializer
-
setThreadConfig
Description copied from interface:ServerFacadeSets thread configuration.- Specified by:
setThreadConfigin interfaceServerFacade- Parameters:
threadConfig- desired thread configuration
-
initiateEventLoopGroups
public void initiateEventLoopGroups(ThreadConfiguration threadConfiguration, boolean isEpollEnabled) Initiate event loop groups.- Parameters:
threadConfiguration- number of threads to be created, if not specified in threadConfig
-
initiateNioEventLoopGroups
Initiate Nio event loop groups.- Parameters:
threadConfiguration- number of threads to be created, if not specified in threadConfig
-
initiateEpollEventLoopGroups
Initiate Epoll event loop groups with Nio as fall back.- Parameters:
threadConfiguration- the ThreadConfiguration
-