ChannelPromise implementation. It is recommended to use Channel#newPromise() to create
a new ChannelPromise rather than calling the constructor explicitly.
| Modifier and Type | Field and Description |
|---|---|
| private final Channel | |
| private long |
| Access | Constructor and Description |
|---|---|
| public | DefaultChannelPromise(Channel
the channel)Channel associated with this futureCreates a new instance. |
| public | DefaultChannelPromise(Channel
the channel, EventExecutor executor)Channel associated with this futureCreates a new instance. |
| channel | back to summary |
|---|---|
| private final Channel channel | |
| checkpoint | back to summary |
|---|---|
| private long checkpoint | |
| DefaultChannelPromise | back to summary |
|---|---|
| public DefaultChannelPromise(Channel channel) Creates a new instance. | |
| DefaultChannelPromise | back to summary |
|---|---|
| public DefaultChannelPromise(Channel channel, EventExecutor executor) Creates a new instance. | |
| addListener | back to summary |
|---|---|
| public ChannelPromise addListener(GenericFutureListener<? extends Future<? super Void>> listener) Overrides io. Implements io. Doc from io. Adds the specified listener to this future. The specified listener is notified when this future is done. If this future is already completed, the specified listener is notified immediately.
| |
| addListeners | back to summary |
|---|---|
| public ChannelPromise addListeners(GenericFutureListener<? extends Future<? super Void>>... listeners) Overrides io. Implements io. Doc from io. Adds the specified listeners to this future. The specified listeners are notified when this future is done. If this future is already completed, the specified listeners are notified immediately.
| |
| await | back to summary |
|---|---|
| public ChannelPromise await() throws InterruptedException Overrides io. Implements io. Doc from io. Waits for this future to be completed.
| |
| awaitUninterruptibly | back to summary |
|---|---|
| public ChannelPromise awaitUninterruptibly() Overrides io. Implements io. Doc from io. Waits for this future to be completed without
interruption. This method catches an
| |
| channel | back to summary |
|---|---|
| public Channel channel() Implements io. Doc from io. Returns a channel where the I/O operation associated with this future takes place.
| |
| checkDeadLock | back to summary |
|---|---|
| protected void checkDeadLock() Overrides io.
| |
| executor | back to summary |
|---|---|
| protected EventExecutor executor() Overrides io. Doc from io. Get the executor used to notify listeners when this promise is complete.
It is assumed this executor will protect against
| |
| flushCheckpoint | back to summary |
|---|---|
| public long flushCheckpoint() Implements io.
| |
| flushCheckpoint | back to summary |
|---|---|
| public void flushCheckpoint(long checkpoint) Implements io.
| |
| isVoid | back to summary |
|---|---|
| public boolean isVoid() Implements io. Doc from io. Returns
| |
| promise | back to summary |
|---|---|
| public ChannelPromise promise() Implements io.
| |
| removeListener | back to summary |
|---|---|
| public ChannelPromise removeListener(GenericFutureListener<? extends Future<? super Void>> listener) Overrides io. Implements io. Doc from io. Removes the first occurrence of the specified listener from this future. The specified listener is no longer notified when this future is done. If the specified listener is not associated with this future, this method does nothing and returns silently.
| |
| removeListeners | back to summary |
|---|---|
| public ChannelPromise removeListeners(GenericFutureListener<? extends Future<? super Void>>... listeners) Overrides io. Implements io. Doc from io. Removes the first occurrence for each of the listeners from this future. The specified listeners are no longer notified when this future is done. If the specified listeners are not associated with this future, this method does nothing and returns silently.
| |
| setFailure | back to summary |
|---|---|
| public ChannelPromise setFailure(Throwable cause) Overrides io. Implements io. Doc from io. Marks this future as a failure and notifies all
listeners.
If it is success or failed already it will throw an
| |
| setSuccess | back to summary |
|---|---|
| public ChannelPromise setSuccess() Implements io.
| |
| setSuccess | back to summary |
|---|---|
| public ChannelPromise setSuccess(Void result) Overrides io. Implements io. Doc from io. Marks this future as a success and notifies all
listeners.
If it is success or failed already it will throw an
| |
| sync | back to summary |
|---|---|
| public ChannelPromise sync() throws InterruptedException Overrides io. Implements io. Doc from io. Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
| |
| syncUninterruptibly | back to summary |
|---|---|
| public ChannelPromise syncUninterruptibly() Overrides io. Implements io. Doc from io. Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
| |
| trySuccess | back to summary |
|---|---|
| public boolean trySuccess() Implements io.
| |
| unvoid | back to summary |
|---|---|
| public ChannelPromise unvoid() Implements io. Doc from io. Returns a new
| |