Package io.netty.bootstrap
Class PendingConnectPromise
java.lang.Object
io.netty.util.concurrent.AbstractFuture<V>
io.netty.util.concurrent.DefaultPromise<Void>
io.netty.bootstrap.PendingConnectPromise
- All Implemented Interfaces:
io.netty.channel.ChannelFuture
,io.netty.channel.ChannelPromise
,io.netty.util.concurrent.Future<Void>
,io.netty.util.concurrent.Promise<Void>
,Future<Void>
public class PendingConnectPromise
extends io.netty.util.concurrent.DefaultPromise<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
ConstructorDescriptionPendingConnectPromise
(CompletableFuture<io.netty.channel.Channel> channelFuture) -
Method Summary
Modifier and TypeMethodDescriptionio.netty.channel.ChannelPromise
addListener
(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> listener) io.netty.channel.ChannelPromise
addListeners
(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>>... listeners) io.netty.channel.ChannelPromise
await()
io.netty.channel.ChannelPromise
io.netty.channel.Channel
channel()
protected void
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 Void>> listener) io.netty.channel.ChannelPromise
removeListeners
(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>>... listeners) io.netty.channel.ChannelPromise
setFailure
(Throwable cause) io.netty.channel.ChannelPromise
io.netty.channel.ChannelPromise
setSuccess
(Void result) io.netty.channel.ChannelPromise
sync()
io.netty.channel.ChannelPromise
boolean
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 Details
-
PendingConnectPromise
-
-
Method Details
-
executor
protected io.netty.util.concurrent.EventExecutor executor()- Overrides:
executor
in classio.netty.util.concurrent.DefaultPromise<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
-
trySuccess
public boolean trySuccess()- Specified by:
trySuccess
in interfaceio.netty.channel.ChannelPromise
-
setFailure
-
addListener
public io.netty.channel.ChannelPromise addListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super 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<Void>
- Specified by:
addListener
in interfaceio.netty.util.concurrent.Promise<Void>
- Overrides:
addListener
in classio.netty.util.concurrent.DefaultPromise<Void>
-
addListeners
public io.netty.channel.ChannelPromise addListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super 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<Void>
- Specified by:
addListeners
in interfaceio.netty.util.concurrent.Promise<Void>
- Overrides:
addListeners
in classio.netty.util.concurrent.DefaultPromise<Void>
-
removeListener
public io.netty.channel.ChannelPromise removeListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super 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<Void>
- Specified by:
removeListener
in interfaceio.netty.util.concurrent.Promise<Void>
- Overrides:
removeListener
in classio.netty.util.concurrent.DefaultPromise<Void>
-
removeListeners
public io.netty.channel.ChannelPromise removeListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super 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<Void>
- Specified by:
removeListeners
in interfaceio.netty.util.concurrent.Promise<Void>
- Overrides:
removeListeners
in classio.netty.util.concurrent.DefaultPromise<Void>
-
sync
- 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<Void>
- Specified by:
sync
in interfaceio.netty.util.concurrent.Promise<Void>
- Overrides:
sync
in classio.netty.util.concurrent.DefaultPromise<Void>
- Throws:
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<Void>
- Specified by:
syncUninterruptibly
in interfaceio.netty.util.concurrent.Promise<Void>
- Overrides:
syncUninterruptibly
in classio.netty.util.concurrent.DefaultPromise<Void>
-
await
- 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<Void>
- Specified by:
await
in interfaceio.netty.util.concurrent.Promise<Void>
- Overrides:
await
in classio.netty.util.concurrent.DefaultPromise<Void>
- Throws:
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<Void>
- Specified by:
awaitUninterruptibly
in interfaceio.netty.util.concurrent.Promise<Void>
- Overrides:
awaitUninterruptibly
in classio.netty.util.concurrent.DefaultPromise<Void>
-
checkDeadLock
protected void checkDeadLock()- Overrides:
checkDeadLock
in classio.netty.util.concurrent.DefaultPromise<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
-