abstract class CompleteChannelFuture extends CompleteFuture<java.lang.Void> implements ChannelFuture
ChannelFuture implementation which represents a
ChannelFuture which has been completed already.| Modifier | Constructor and Description |
|---|---|
protected |
CompleteChannelFuture(Channel channel,
EventExecutor executor)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
ChannelFuture |
addListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Adds the specified listener to this future.
|
ChannelFuture |
addListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Adds the specified listeners to this future.
|
ChannelFuture |
await()
Waits for this future to be completed.
|
ChannelFuture |
awaitUninterruptibly()
Waits for this future to be completed without
interruption.
|
Channel |
channel()
Returns a channel where the I/O operation associated with this
future takes place.
|
protected EventExecutor |
executor()
Return the
EventExecutor which is used by this CompleteFuture. |
java.lang.Void |
getNow()
Return the result without blocking.
|
boolean |
isVoid()
Returns
true if this ChannelFuture is a void future and so not allow to call any of the
following methods:
ChannelFuture.addListener(GenericFutureListener)
ChannelFuture.addListeners(GenericFutureListener[])
ChannelFuture.await()
Future.await(long, TimeUnit) ()}
Future.await(long) ()}
ChannelFuture.awaitUninterruptibly()
ChannelFuture.sync()
ChannelFuture.syncUninterruptibly()
|
ChannelFuture |
removeListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Removes the first occurrence of the specified listener from this future.
|
ChannelFuture |
removeListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Removes the first occurrence for each of the listeners from this future.
|
ChannelFuture |
sync()
Waits for this future until it is done, and rethrows the cause of the failure if this future
failed.
|
ChannelFuture |
syncUninterruptibly()
Waits for this future until it is done, and rethrows the cause of the failure if this future
failed.
|
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, isCancellable, isCancelled, isDoneget, getclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitawait, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, isCancellable, isSuccessprivate final Channel channel
protected CompleteChannelFuture(Channel channel, EventExecutor executor)
channel - the Channel associated with this futureprotected EventExecutor executor()
CompleteFutureEventExecutor which is used by this CompleteFuture.executor in class CompleteFuture<java.lang.Void>public ChannelFuture addListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
FutureaddListener in interface ChannelFutureaddListener in class CompleteFuture<java.lang.Void>public ChannelFuture addListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
FutureaddListeners in interface ChannelFutureaddListeners in class CompleteFuture<java.lang.Void>public ChannelFuture removeListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
FutureremoveListener in interface ChannelFutureremoveListener in class CompleteFuture<java.lang.Void>public ChannelFuture removeListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
FutureremoveListeners in interface ChannelFutureremoveListeners in class CompleteFuture<java.lang.Void>public ChannelFuture syncUninterruptibly()
FuturesyncUninterruptibly in interface ChannelFuturesyncUninterruptibly in class CompleteFuture<java.lang.Void>public ChannelFuture sync() throws java.lang.InterruptedException
Futuresync in interface ChannelFuturesync in class CompleteFuture<java.lang.Void>java.lang.InterruptedExceptionpublic ChannelFuture await() throws java.lang.InterruptedException
Futureawait in interface ChannelFutureawait in class CompleteFuture<java.lang.Void>java.lang.InterruptedException - if the current thread was interruptedpublic ChannelFuture awaitUninterruptibly()
FutureInterruptedException and
discards it silently.awaitUninterruptibly in interface ChannelFutureawaitUninterruptibly in class CompleteFuture<java.lang.Void>public Channel channel()
ChannelFuturechannel in interface ChannelFuturepublic java.lang.Void getNow()
Futurenull.
As it is possible that a null value is used to mark the future as successful you also need to check
if the future is really done with Future.isDone() and not relay on the returned null value.public boolean isVoid()
ChannelFuturetrue if this ChannelFuture is a void future and so not allow to call any of the
following methods:
isVoid in interface ChannelFuture