* @author michal.polkorab
*/
public final class UdpHandler implements ServerFacade {
-
private static final Logger LOG = LoggerFactory.getLogger(UdpHandler.class);
- private int port;
- private EventLoopGroup group;
+ private final SettableFuture<Void> isOnlineFuture = SettableFuture.create();
private final InetAddress startupAddress;
private final Runnable readyRunnable;
- private final SettableFuture<Boolean> isOnlineFuture = SettableFuture.create();
+ private int port;
+ private EventLoopGroup group;
private UdpChannelInitializer channelInitializer;
private Class<? extends DatagramChannel> datagramChannelClass;
LOG.debug("Address from udpHandler: {}", address);
LOG.info("Switch listener started and ready to accept incoming udp connections on port: {}", port);
readyRunnable.run();
- isOnlineFuture.set(true);
+ isOnlineFuture.set(null);
// This waits until this channel is closed, and rethrows the cause of the failure if this future failed.
f.channel().closeFuture().sync();
}
@Override
- public ListenableFuture<Boolean> getIsOnlineFuture() {
+ public ListenableFuture<Void> getIsOnlineFuture() {
return isOnlineFuture;
}