Example usage for Java io.netty.channel ChannelPromise fields, constructors, methods, implement or subclass
The text is from its open source code.
ChannelPromise | addListener(GenericFutureListener extends Future super Void>> listener) |
boolean | await(long timeout, TimeUnit unit) Waits for this future to be completed within the specified time limit. |
boolean | await(long timeoutMillis) Waits for this future to be completed within the specified time limit. |
ChannelPromise | await() |
boolean | awaitUninterruptibly(long timeout, TimeUnit unit) Waits for this future to be completed within the specified time limit without interruption. |
boolean | cancel(boolean mayInterruptIfRunning) If the cancellation was successful it will fail the future with a CancellationException . |
Throwable | cause() Returns the cause of the failed I/O operation if the I/O operation has failed. |
Channel | channel() |
boolean | isSuccess() Returns true if and only if the I/O operation was completed successfully. |
boolean | isVoid() Returns true if this ChannelFuture is a void future and so not allow to call any of the following methods:
|
ChannelPromise | setFailure(Throwable cause) |
ChannelPromise | setSuccess() |
ChannelPromise | setSuccess(Void result) |
boolean | tryFailure(Throwable cause) Marks this future as a failure and notifies all listeners. |
boolean | trySuccess() |
ChannelPromise | unvoid() Returns a new ChannelPromise if #isVoid() returns true otherwise itself. |