private static final Logger LOG = LoggerFactory.getLogger(TcpHandler.class);
- private int port;
- private String address;
+ private final SettableFuture<Void> isOnlineFuture = SettableFuture.create();
private final InetAddress startupAddress;
private final Runnable readyRunnable;
+
+ private int port;
+ private String address;
private EventLoopGroup workerGroup;
private EventLoopGroup bossGroup;
- private final SettableFuture<Boolean> isOnlineFuture = SettableFuture.create();
private TcpChannelInitializer channelInitializer;
LOG.debug("address from tcphandler: {}", address);
LOG.info("Switch listener started and ready to accept incoming tcp/tls 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;
}