public abstract class CompletePromise<V> extends CompleteFuture<V> implements Promise<V>
| Modifier | Constructor and Description |
|---|---|
protected |
CompletePromise(EventExecutor executor) |
| Modifier and Type | Method and Description |
|---|---|
Promise<V> |
addListener(GenericFutureListener<? extends Future<? super V>> listener)
Adds the specified listener to this future.
|
Promise<V> |
addListeners(GenericFutureListener<? extends Future<? super V>>... listeners)
Adds the specified listeners to this future.
|
Promise<V> |
await()
Waits for this future to be completed.
|
Promise<V> |
awaitUninterruptibly()
Waits for this future to be completed without
interruption.
|
Promise<V> |
removeListener(GenericFutureListener<? extends Future<? super V>> listener)
Removes the specified listener from this future.
|
Promise<V> |
removeListeners(GenericFutureListener<? extends Future<? super V>>... listeners)
Removes the specified listeners from this future.
|
Promise<V> |
setFailure(Throwable cause)
Marks this future as a failure and notifies all
listeners.
|
Promise<V> |
setSuccess(V result)
Marks this future as a success and notifies all
listeners.
|
Promise<V> |
sync()
Waits for this future until it is done, and rethrows the cause of the failure if this future
failed.
|
Promise<V> |
syncUninterruptibly()
Waits for this future until it is done, and rethrows the cause of the failure if this future
failed.
|
boolean |
tryFailure(Throwable cause)
Marks this future as a failure and notifies all
listeners.
|
boolean |
trySuccess(V result)
Marks this future as a success and notifies all
listeners.
|
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, executor, isCancellable, isCancelled, isDoneget, getclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetUncancellableawait, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isSuccessget, get, isCancelled, isDoneprotected CompletePromise(EventExecutor executor)
public Promise<V> setFailure(Throwable cause)
PromiseIllegalStateException.setFailure in interface Promise<V>public boolean tryFailure(Throwable cause)
PromisetryFailure in interface Promise<V>true if and only if successfully marked this future as
a failure. Otherwise false because this future is
already marked as either a success or a failure.public Promise<V> setSuccess(V result)
PromiseIllegalStateException.setSuccess in interface Promise<V>public boolean trySuccess(V result)
PromisetrySuccess in interface Promise<V>true if and only if successfully marked this future as
a success. Otherwise false because this future is
already marked as either a success or a failure.public Promise<V> await() throws InterruptedException
Futureawait in interface Promise<V>await in class CompleteFuture<V>InterruptedException - if the current thread was interruptedpublic Promise<V> awaitUninterruptibly()
FutureInterruptedException and
discards it silently.awaitUninterruptibly in interface Promise<V>awaitUninterruptibly in class CompleteFuture<V>public Promise<V> syncUninterruptibly()
FuturesyncUninterruptibly in interface Promise<V>syncUninterruptibly in class CompleteFuture<V>public Promise<V> sync() throws InterruptedException
Futuresync in interface Promise<V>sync in class CompleteFuture<V>InterruptedExceptionpublic Promise<V> addListener(GenericFutureListener<? extends Future<? super V>> listener)
FutureaddListener in interface Promise<V>addListener in class CompleteFuture<V>public Promise<V> addListeners(GenericFutureListener<? extends Future<? super V>>... listeners)
FutureaddListeners in interface Promise<V>addListeners in class CompleteFuture<V>public Promise<V> removeListener(GenericFutureListener<? extends Future<? super V>> listener)
FutureremoveListener in interface Promise<V>removeListener in class CompleteFuture<V>public Promise<V> removeListeners(GenericFutureListener<? extends Future<? super V>>... listeners)
FutureremoveListeners in interface Promise<V>removeListeners in class CompleteFuture<V>Copyright © 2008-2013 The Netty Project. All Rights Reserved.