Package io.netty.util.concurrent

Examples of io.netty.util.concurrent.GenericFutureListener


                if (shutdown) {
                    subscriber.onNext(true);
                    subscriber.onCompleted();
                }

                ioPool.shutdownGracefully().addListener(new GenericFutureListener() {
                    @Override
                    public void operationComplete(final Future future) throws Exception {
                        if (!subscriber.isUnsubscribed()) {
                            if (future.isSuccess()) {
                                subscriber.onNext(future.isSuccess());
View Full Code Here


        new Consumer<Void>() {
          @SuppressWarnings({"rawtypes", "unchecked"})
          @Override
          public void accept(Void v) {
            final AtomicInteger groupsToShutdown = new AtomicInteger(2);
            GenericFutureListener listener = new GenericFutureListener() {

              @Override
              public void operationComplete(Future future) throws Exception {
                if (groupsToShutdown.decrementAndGet() == 0) {
                  notifyShutdown();
View Full Code Here

    getReactor().schedule(
        new Consumer<Void>() {
          @SuppressWarnings("unchecked")
          @Override
          public void accept(Void v) {
            GenericFutureListener listener = new GenericFutureListener() {
              @Override
              public void operationComplete(Future future) throws Exception {
                if (future.isSuccess()) {
                  d.onNext(true);
                } else {
View Full Code Here

    @SuppressWarnings("unchecked")
    void fail(final Throwable cause) {
        final ConnectionState lastStateBeforeFailure = serverConnection
                .getCurrentState();
        serverConnection.disconnect().addListener(
                new GenericFutureListener() {
                    @Override
                    public void operationComplete(Future future)
                            throws Exception {
                        synchronized (connectLock) {
                            if (!clientConnection.serverConnectionFailed(
View Full Code Here

    return shutdownFuture();
  }
 
  @SuppressWarnings({ "unchecked", "rawtypes" })
    private void shutdownNetty() {
    workerGroup.shutdownGracefully(0, 0, TimeUnit.SECONDS).addListener(new GenericFutureListener() {
      @Override
      public void operationComplete(final Future future) throws Exception {
        LOG.debug("shutdown done in client / workerGroup...");
        bossGroup.shutdownGracefully(0, 0, TimeUnit.SECONDS).addListener(
                new GenericFutureListener() {
                  @Override
                  public void operationComplete(final Future future) throws Exception {
                    LOG.debug("shutdown done in client / bossGroup...");
                    shutdownFuture().done();
                  }
View Full Code Here

TOP

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

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.