private final InetAddress startupAddress;
private final Runnable readyRunnable;
private final SettableFuture<Boolean> isOnlineFuture = SettableFuture.create();
+
private UdpChannelInitializer channelInitializer;
- private ThreadConfiguration threadConfig;
private Class<? extends DatagramChannel> datagramChannelClass;
/**
*
* @param port listening port of UdpHandler server
*/
- public UdpHandler(final int port, Runnable readyRunnable) {
+ public UdpHandler(final int port, final Runnable readyRunnable) {
this(null, port, readyRunnable);
}
* @param address listening address of UdpHandler server
* @param port listening port of UdpHandler server
*/
- public UdpHandler(final InetAddress address, final int port, Runnable readyRunnable) {
+ public UdpHandler(final InetAddress address, final int port, final Runnable readyRunnable) {
this.port = port;
- this.startupAddress = address;
+ startupAddress = address;
this.readyRunnable = readyRunnable;
}
String address = isa.getHostString();
// Update port, as it may have been specified as 0
- this.port = isa.getPort();
+ port = isa.getPort();
LOG.debug("Address from udpHandler: {}", address);
LOG.info("Switch listener started and ready to accept incoming udp connections on port: {}", port);
return port;
}
- public void setChannelInitializer(UdpChannelInitializer channelInitializer) {
+ public void setChannelInitializer(final UdpChannelInitializer channelInitializer) {
this.channelInitializer = channelInitializer;
}
@Override
- public void setThreadConfig(ThreadConfiguration threadConfig) {
- this.threadConfig = threadConfig;
+ @Deprecated(since = "0.17.2", forRemoval = true)
+ public void setThreadConfig(final ThreadConfiguration threadConfig) {
+ // No-op
}
/**
*
* @param threadConfiguration number of threads to be created, if not specified in threadConfig
*/
- public void initiateEventLoopGroups(ThreadConfiguration threadConfiguration, boolean isEpollEnabled) {
+ public void initiateEventLoopGroups(final ThreadConfiguration threadConfiguration, final boolean isEpollEnabled) {
if (isEpollEnabled) {
initiateEpollEventLoopGroups(threadConfiguration);
} else {
*
* @param threadConfiguration number of threads to be created, if not specified in threadConfig
*/
- public void initiateNioEventLoopGroups(ThreadConfiguration threadConfiguration) {
+ public void initiateNioEventLoopGroups(final ThreadConfiguration threadConfiguration) {
datagramChannelClass = NioDatagramChannel.class;
if (threadConfiguration != null) {
group = new NioEventLoopGroup(threadConfiguration.getWorkerThreadCount());
* @param threadConfiguration the ThreadConfiguration
*/
@SuppressWarnings("checkstyle:IllegalCatch")
- protected void initiateEpollEventLoopGroups(ThreadConfiguration threadConfiguration) {
+ protected void initiateEpollEventLoopGroups(final ThreadConfiguration threadConfiguration) {
try {
datagramChannelClass = EpollDatagramChannel.class;
if (threadConfiguration != null) {