Exemplo n.º 1
0
 @Override
 public void close() {
   if (closed.compareAndSet(false, true)) {
     ((NetLightClient) client).close();
     loopGroup.shutdownGracefully();
     serverSentMessageNotifier.stop();
   }
 }
Exemplo n.º 2
0
 public boolean connect() {
   if (closed.get()) {
     throw new IllegalStateException("Connector closed");
   }
   return client.connect();
 }
Exemplo n.º 3
0
 public MessageFuture send(MessagePromise promise) {
   if (closed.get()) {
     throw new IllegalStateException("Connector closed");
   }
   return messageHandler.send(promise);
 }