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