public final class UdpHandler extends Object implements ServerFacade
Constructor and Description |
---|
UdpHandler(InetAddress address,
int port,
Runnable readyRunnable)
Constructor of UdpHandler that listens on selected address and port.
|
UdpHandler(int port,
Runnable readyRunnable)
Constructor of UdpHandler that listens on selected port.
|
Modifier and Type | Method and Description |
---|---|
com.google.common.util.concurrent.ListenableFuture<Boolean> |
getIsOnlineFuture() |
int |
getPort() |
protected void |
initiateEpollEventLoopGroups(ThreadConfiguration threadConfiguration)
Initiate Epoll event loop groups with Nio as fall back.
|
void |
initiateEventLoopGroups(ThreadConfiguration threadConfiguration,
boolean isEpollEnabled)
Initiate event loop groups.
|
void |
initiateNioEventLoopGroups(ThreadConfiguration threadConfiguration)
Initiate Nio event loop groups.
|
void |
run() |
void |
setChannelInitializer(UdpChannelInitializer channelInitializer) |
void |
setThreadConfig(ThreadConfiguration threadConfig)
Sets thread configuration.
|
com.google.common.util.concurrent.ListenableFuture<Boolean> |
shutdown() |
public UdpHandler(int port, Runnable readyRunnable)
port
- listening port of UdpHandler serverpublic UdpHandler(InetAddress address, int port, Runnable readyRunnable)
address
- listening address of UdpHandler serverport
- listening port of UdpHandler serverpublic com.google.common.util.concurrent.ListenableFuture<Boolean> shutdown()
shutdown
in interface ShutdownProvider
public com.google.common.util.concurrent.ListenableFuture<Boolean> getIsOnlineFuture()
getIsOnlineFuture
in interface OnlineProvider
public int getPort()
public void setChannelInitializer(UdpChannelInitializer channelInitializer)
public void setThreadConfig(ThreadConfiguration threadConfig)
ServerFacade
setThreadConfig
in interface ServerFacade
threadConfig
- desired thread configurationpublic void initiateEventLoopGroups(ThreadConfiguration threadConfiguration, boolean isEpollEnabled)
threadConfiguration
- number of threads to be created, if not specified in threadConfigpublic void initiateNioEventLoopGroups(ThreadConfiguration threadConfiguration)
threadConfiguration
- number of threads to be created, if not specified in threadConfigprotected void initiateEpollEventLoopGroups(ThreadConfiguration threadConfiguration)
threadConfiguration
- the ThreadConfigurationCopyright © 2020 OpenDaylight. All rights reserved.