Package io.netty.util.concurrent

Examples of io.netty.util.concurrent.FutureListener


                removeListener(channel, listener);
            }
        }

        Future future = conn.unsubscribe(channel);
        future.addListener(new FutureListener() {
            @Override
            public void operationComplete(Future future) throws Exception {
                subscribedChannelsAmount.release();
            }
        });
View Full Code Here


        if (entry == null) {
            return group.next().newSucceededFuture(null);
        }

        Future future = entry.unsubscribe(channelName);
        future.addListener(new FutureListener() {
            @Override
            public void operationComplete(Future future) throws Exception {
                synchronized (entry) {
                    if (entry.tryClose()) {
                        returnSubscribeConnection(-1, entry);
View Full Code Here

  @PreDestroy
  void stop() {
    Future<?> listenersFuture = this.listeners.shutdownGracefully();
    Future<?> workersFuture = this.workers.shutdownGracefully();

    listenersFuture.addListener(new FutureListener() {
      @Override
      public void operationComplete(Future future) throws Exception {
        if (future.isSuccess()) {
          log.info("Listeners are shut down");
        } else {
          log.catching(future.cause());
        }
      }
    });

    workersFuture.addListener(new FutureListener() {
      @Override
      public void operationComplete(Future future) throws Exception {
        if (future.isSuccess()) {
          log.info("Workers are shut down");
        } else {
View Full Code Here

TOP

Related Classes of io.netty.util.concurrent.FutureListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.