Package io.netty.bootstrap
Class PendingConnectFuturePromise
- java.lang.Object
-
- io.netty.util.concurrent.AbstractFuture<V>
-
- io.netty.util.concurrent.DefaultPromise<java.lang.Void>
-
- io.netty.bootstrap.PendingConnectFuturePromise
-
- 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 PendingConnectFuturePromise 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 PendingConnectFuturePromise(io.netty.util.concurrent.Promise<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
-
-
-
-
Method Detail
-
executor
protected io.netty.util.concurrent.EventExecutor executor()
- Overrides:
executor
in classio.netty.util.concurrent.DefaultPromise<java.lang.Void>
-
channel
public io.netty.channel.Channel channel()
- Specified by:
channel
in interfaceio.netty.channel.ChannelFuture
- Specified by:
channel
in interfaceio.netty.channel.ChannelPromise
-
setSuccess
public io.netty.channel.ChannelPromise setSuccess()
- Specified by:
setSuccess
in interfaceio.netty.channel.ChannelPromise
-
setSuccess
public io.netty.channel.ChannelPromise setSuccess(java.lang.Void result)
- Specified by:
setSuccess
in interfaceio.netty.channel.ChannelPromise
- Specified by:
setSuccess
in interfaceio.netty.util.concurrent.Promise<java.lang.Void>
- Overrides:
setSuccess
in classio.netty.util.concurrent.DefaultPromise<java.lang.Void>
-
trySuccess
public boolean trySuccess()
- Specified by:
trySuccess
in interfaceio.netty.channel.ChannelPromise
-
setFailure
public io.netty.channel.ChannelPromise setFailure(java.lang.Throwable cause)
- Specified by:
setFailure
in interfaceio.netty.channel.ChannelPromise
- Specified by:
setFailure
in interfaceio.netty.util.concurrent.Promise<java.lang.Void>
- Overrides:
setFailure
in classio.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 interfaceio.netty.channel.ChannelFuture
- Specified by:
addListener
in interfaceio.netty.channel.ChannelPromise
- Specified by:
addListener
in interfaceio.netty.util.concurrent.Future<java.lang.Void>
- Specified by:
addListener
in interfaceio.netty.util.concurrent.Promise<java.lang.Void>
- Overrides:
addListener
in classio.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 interfaceio.netty.channel.ChannelFuture
- Specified by:
addListeners
in interfaceio.netty.channel.ChannelPromise
- Specified by:
addListeners
in interfaceio.netty.util.concurrent.Future<java.lang.Void>
- Specified by:
addListeners
in interfaceio.netty.util.concurrent.Promise<java.lang.Void>
- Overrides:
addListeners
in classio.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 interfaceio.netty.channel.ChannelFuture
- Specified by:
removeListener
in interfaceio.netty.channel.ChannelPromise
- Specified by:
removeListener
in interfaceio.netty.util.concurrent.Future<java.lang.Void>
- Specified by:
removeListener
in interfaceio.netty.util.concurrent.Promise<java.lang.Void>
- Overrides:
removeListener
in classio.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 interfaceio.netty.channel.ChannelFuture
- Specified by:
removeListeners
in interfaceio.netty.channel.ChannelPromise
- Specified by:
removeListeners
in interfaceio.netty.util.concurrent.Future<java.lang.Void>
- Specified by:
removeListeners
in interfaceio.netty.util.concurrent.Promise<java.lang.Void>
- Overrides:
removeListeners
in classio.netty.util.concurrent.DefaultPromise<java.lang.Void>
-
sync
public io.netty.channel.ChannelPromise sync() throws java.lang.InterruptedException
- Specified by:
sync
in interfaceio.netty.channel.ChannelFuture
- Specified by:
sync
in interfaceio.netty.channel.ChannelPromise
- Specified by:
sync
in interfaceio.netty.util.concurrent.Future<java.lang.Void>
- Specified by:
sync
in interfaceio.netty.util.concurrent.Promise<java.lang.Void>
- Overrides:
sync
in classio.netty.util.concurrent.DefaultPromise<java.lang.Void>
- Throws:
java.lang.InterruptedException
-
syncUninterruptibly
public io.netty.channel.ChannelPromise syncUninterruptibly()
- Specified by:
syncUninterruptibly
in interfaceio.netty.channel.ChannelFuture
- Specified by:
syncUninterruptibly
in interfaceio.netty.channel.ChannelPromise
- Specified by:
syncUninterruptibly
in interfaceio.netty.util.concurrent.Future<java.lang.Void>
- Specified by:
syncUninterruptibly
in interfaceio.netty.util.concurrent.Promise<java.lang.Void>
- Overrides:
syncUninterruptibly
in classio.netty.util.concurrent.DefaultPromise<java.lang.Void>
-
await
public io.netty.channel.ChannelPromise await() throws java.lang.InterruptedException
- Specified by:
await
in interfaceio.netty.channel.ChannelFuture
- Specified by:
await
in interfaceio.netty.channel.ChannelPromise
- Specified by:
await
in interfaceio.netty.util.concurrent.Future<java.lang.Void>
- Specified by:
await
in interfaceio.netty.util.concurrent.Promise<java.lang.Void>
- Overrides:
await
in classio.netty.util.concurrent.DefaultPromise<java.lang.Void>
- Throws:
java.lang.InterruptedException
-
awaitUninterruptibly
public io.netty.channel.ChannelPromise awaitUninterruptibly()
- Specified by:
awaitUninterruptibly
in interfaceio.netty.channel.ChannelFuture
- Specified by:
awaitUninterruptibly
in interfaceio.netty.channel.ChannelPromise
- Specified by:
awaitUninterruptibly
in interfaceio.netty.util.concurrent.Future<java.lang.Void>
- Specified by:
awaitUninterruptibly
in interfaceio.netty.util.concurrent.Promise<java.lang.Void>
- Overrides:
awaitUninterruptibly
in classio.netty.util.concurrent.DefaultPromise<java.lang.Void>
-
checkDeadLock
protected void checkDeadLock()
- Overrides:
checkDeadLock
in classio.netty.util.concurrent.DefaultPromise<java.lang.Void>
-
unvoid
public io.netty.channel.ChannelPromise unvoid()
- Specified by:
unvoid
in interfaceio.netty.channel.ChannelPromise
-
isVoid
public boolean isVoid()
- Specified by:
isVoid
in interfaceio.netty.channel.ChannelFuture
-
-