Class PendingConnectPromise

  • All Implemented Interfaces:
    io.netty.channel.ChannelFuture, io.netty.channel.ChannelPromise, io.netty.util.concurrent.Future<java.lang.Void>, io.netty.util.concurrent.Promise<java.lang.Void>, java.util.concurrent.Future<java.lang.Void>

    public class PendingConnectPromise
    extends io.netty.util.concurrent.DefaultPromise<java.lang.Void>
    implements io.netty.channel.ChannelPromise
    The implementation of this method is mostly similar to DefaultChannelFuture except that we store the Channel inside a CompletableFuture because it is not yet known at the time of construction. Created by acurtis on 4/23/18.
    • Constructor Summary

      Constructors 
      Constructor Description
      PendingConnectPromise​(java.util.concurrent.CompletableFuture<io.netty.channel.Channel> channelFuture)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.netty.channel.ChannelPromise addListener​(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener)  
      io.netty.channel.ChannelPromise addListeners​(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>>... listeners)  
      io.netty.channel.ChannelPromise await()  
      io.netty.channel.ChannelPromise awaitUninterruptibly()  
      io.netty.channel.Channel channel()  
      protected void checkDeadLock()  
      protected io.netty.util.concurrent.EventExecutor executor()  
      boolean isVoid()  
      io.netty.channel.ChannelPromise removeListener​(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener)  
      io.netty.channel.ChannelPromise removeListeners​(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>>... listeners)  
      io.netty.channel.ChannelPromise setFailure​(java.lang.Throwable cause)  
      io.netty.channel.ChannelPromise setSuccess()  
      io.netty.channel.ChannelPromise setSuccess​(java.lang.Void result)  
      io.netty.channel.ChannelPromise sync()  
      io.netty.channel.ChannelPromise syncUninterruptibly()  
      boolean trySuccess()  
      io.netty.channel.ChannelPromise unvoid()  
      • Methods inherited from class io.netty.util.concurrent.DefaultPromise

        await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, get, get, getNow, isCancellable, isCancelled, isDone, isSuccess, notifyListener, setUncancellable, toString, toStringBuilder, tryFailure, trySuccess
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface io.netty.util.concurrent.Future

        await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isSuccess
      • Methods inherited from interface java.util.concurrent.Future

        get, get, isCancelled, isDone
      • Methods inherited from interface io.netty.util.concurrent.Promise

        setUncancellable, tryFailure, trySuccess
    • Constructor Detail

      • PendingConnectPromise

        public PendingConnectPromise​(@Nonnull
                                     java.util.concurrent.CompletableFuture<io.netty.channel.Channel> channelFuture)
    • Method Detail

      • executor

        protected io.netty.util.concurrent.EventExecutor executor()
        Overrides:
        executor in class io.netty.util.concurrent.DefaultPromise<java.lang.Void>
      • channel

        public io.netty.channel.Channel channel()
        Specified by:
        channel in interface io.netty.channel.ChannelFuture
        Specified by:
        channel in interface io.netty.channel.ChannelPromise
      • setSuccess

        public io.netty.channel.ChannelPromise setSuccess()
        Specified by:
        setSuccess in interface io.netty.channel.ChannelPromise
      • setSuccess

        public io.netty.channel.ChannelPromise setSuccess​(java.lang.Void result)
        Specified by:
        setSuccess in interface io.netty.channel.ChannelPromise
        Specified by:
        setSuccess in interface io.netty.util.concurrent.Promise<java.lang.Void>
        Overrides:
        setSuccess in class io.netty.util.concurrent.DefaultPromise<java.lang.Void>
      • trySuccess

        public boolean trySuccess()
        Specified by:
        trySuccess in interface io.netty.channel.ChannelPromise
      • setFailure

        public io.netty.channel.ChannelPromise setFailure​(java.lang.Throwable cause)
        Specified by:
        setFailure in interface io.netty.channel.ChannelPromise
        Specified by:
        setFailure in interface io.netty.util.concurrent.Promise<java.lang.Void>
        Overrides:
        setFailure in class io.netty.util.concurrent.DefaultPromise<java.lang.Void>
      • addListener

        public io.netty.channel.ChannelPromise addListener​(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener)
        Specified by:
        addListener in interface io.netty.channel.ChannelFuture
        Specified by:
        addListener in interface io.netty.channel.ChannelPromise
        Specified by:
        addListener in interface io.netty.util.concurrent.Future<java.lang.Void>
        Specified by:
        addListener in interface io.netty.util.concurrent.Promise<java.lang.Void>
        Overrides:
        addListener in class io.netty.util.concurrent.DefaultPromise<java.lang.Void>
      • addListeners

        public io.netty.channel.ChannelPromise addListeners​(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>>... listeners)
        Specified by:
        addListeners in interface io.netty.channel.ChannelFuture
        Specified by:
        addListeners in interface io.netty.channel.ChannelPromise
        Specified by:
        addListeners in interface io.netty.util.concurrent.Future<java.lang.Void>
        Specified by:
        addListeners in interface io.netty.util.concurrent.Promise<java.lang.Void>
        Overrides:
        addListeners in class io.netty.util.concurrent.DefaultPromise<java.lang.Void>
      • removeListener

        public io.netty.channel.ChannelPromise removeListener​(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener)
        Specified by:
        removeListener in interface io.netty.channel.ChannelFuture
        Specified by:
        removeListener in interface io.netty.channel.ChannelPromise
        Specified by:
        removeListener in interface io.netty.util.concurrent.Future<java.lang.Void>
        Specified by:
        removeListener in interface io.netty.util.concurrent.Promise<java.lang.Void>
        Overrides:
        removeListener in class io.netty.util.concurrent.DefaultPromise<java.lang.Void>
      • removeListeners

        public io.netty.channel.ChannelPromise removeListeners​(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>>... listeners)
        Specified by:
        removeListeners in interface io.netty.channel.ChannelFuture
        Specified by:
        removeListeners in interface io.netty.channel.ChannelPromise
        Specified by:
        removeListeners in interface io.netty.util.concurrent.Future<java.lang.Void>
        Specified by:
        removeListeners in interface io.netty.util.concurrent.Promise<java.lang.Void>
        Overrides:
        removeListeners in class io.netty.util.concurrent.DefaultPromise<java.lang.Void>
      • sync

        public io.netty.channel.ChannelPromise sync()
                                             throws java.lang.InterruptedException
        Specified by:
        sync in interface io.netty.channel.ChannelFuture
        Specified by:
        sync in interface io.netty.channel.ChannelPromise
        Specified by:
        sync in interface io.netty.util.concurrent.Future<java.lang.Void>
        Specified by:
        sync in interface io.netty.util.concurrent.Promise<java.lang.Void>
        Overrides:
        sync in class io.netty.util.concurrent.DefaultPromise<java.lang.Void>
        Throws:
        java.lang.InterruptedException
      • syncUninterruptibly

        public io.netty.channel.ChannelPromise syncUninterruptibly()
        Specified by:
        syncUninterruptibly in interface io.netty.channel.ChannelFuture
        Specified by:
        syncUninterruptibly in interface io.netty.channel.ChannelPromise
        Specified by:
        syncUninterruptibly in interface io.netty.util.concurrent.Future<java.lang.Void>
        Specified by:
        syncUninterruptibly in interface io.netty.util.concurrent.Promise<java.lang.Void>
        Overrides:
        syncUninterruptibly in class io.netty.util.concurrent.DefaultPromise<java.lang.Void>
      • await

        public io.netty.channel.ChannelPromise await()
                                              throws java.lang.InterruptedException
        Specified by:
        await in interface io.netty.channel.ChannelFuture
        Specified by:
        await in interface io.netty.channel.ChannelPromise
        Specified by:
        await in interface io.netty.util.concurrent.Future<java.lang.Void>
        Specified by:
        await in interface io.netty.util.concurrent.Promise<java.lang.Void>
        Overrides:
        await in class io.netty.util.concurrent.DefaultPromise<java.lang.Void>
        Throws:
        java.lang.InterruptedException
      • awaitUninterruptibly

        public io.netty.channel.ChannelPromise awaitUninterruptibly()
        Specified by:
        awaitUninterruptibly in interface io.netty.channel.ChannelFuture
        Specified by:
        awaitUninterruptibly in interface io.netty.channel.ChannelPromise
        Specified by:
        awaitUninterruptibly in interface io.netty.util.concurrent.Future<java.lang.Void>
        Specified by:
        awaitUninterruptibly in interface io.netty.util.concurrent.Promise<java.lang.Void>
        Overrides:
        awaitUninterruptibly in class io.netty.util.concurrent.DefaultPromise<java.lang.Void>
      • checkDeadLock

        protected void checkDeadLock()
        Overrides:
        checkDeadLock in class io.netty.util.concurrent.DefaultPromise<java.lang.Void>
      • unvoid

        public io.netty.channel.ChannelPromise unvoid()
        Specified by:
        unvoid in interface io.netty.channel.ChannelPromise
      • isVoid

        public boolean isVoid()
        Specified by:
        isVoid in interface io.netty.channel.ChannelFuture