public interface ChannelPromise extends ChannelFuture, Promise<java.lang.Void>
ChannelFuture
which is writable.限定符和类型 | 方法和说明 |
---|---|
ChannelPromise |
addListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Adds the specified listener to this future.
|
ChannelPromise |
addListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Adds the specified listeners to this future.
|
ChannelPromise |
await()
Waits for this future to be completed.
|
ChannelPromise |
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.
|
ChannelPromise |
removeListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Removes the first occurrence of the specified listener from this future.
|
ChannelPromise |
removeListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Removes the first occurrence for each of the listeners from this future.
|
ChannelPromise |
setFailure(java.lang.Throwable cause)
Marks this future as a failure and notifies all
listeners.
|
ChannelPromise |
setSuccess() |
ChannelPromise |
setSuccess(java.lang.Void result)
Marks this future as a success and notifies all
listeners.
|
ChannelPromise |
sync()
Waits for this future until it is done, and rethrows the cause of the failure if this future
failed.
|
ChannelPromise |
syncUninterruptibly()
Waits for this future until it is done, and rethrows the cause of the failure if this future
failed.
|
boolean |
trySuccess() |
ChannelPromise |
unvoid()
|
isVoid
setUncancellable, tryFailure, trySuccess
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isSuccess
Channel channel()
ChannelFuture
channel
在接口中 ChannelFuture
ChannelPromise setSuccess(java.lang.Void result)
Promise
IllegalStateException
.setSuccess
在接口中 Promise<java.lang.Void>
ChannelPromise setSuccess()
boolean trySuccess()
ChannelPromise setFailure(java.lang.Throwable cause)
Promise
IllegalStateException
.setFailure
在接口中 Promise<java.lang.Void>
ChannelPromise addListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Future
addListener
在接口中 ChannelFuture
addListener
在接口中 Promise<java.lang.Void>
ChannelPromise addListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Future
addListeners
在接口中 ChannelFuture
addListeners
在接口中 Promise<java.lang.Void>
ChannelPromise removeListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Future
removeListener
在接口中 ChannelFuture
removeListener
在接口中 Promise<java.lang.Void>
ChannelPromise removeListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Future
removeListeners
在接口中 ChannelFuture
removeListeners
在接口中 Promise<java.lang.Void>
ChannelPromise sync() throws java.lang.InterruptedException
Future
sync
在接口中 ChannelFuture
sync
在接口中 Promise<java.lang.Void>
java.lang.InterruptedException
ChannelPromise syncUninterruptibly()
Future
syncUninterruptibly
在接口中 ChannelFuture
syncUninterruptibly
在接口中 Promise<java.lang.Void>
ChannelPromise await() throws java.lang.InterruptedException
Future
await
在接口中 ChannelFuture
await
在接口中 Promise<java.lang.Void>
java.lang.InterruptedException
- if the current thread was interruptedChannelPromise awaitUninterruptibly()
Future
InterruptedException
and
discards it silently.awaitUninterruptibly
在接口中 ChannelFuture
awaitUninterruptibly
在接口中 Promise<java.lang.Void>
ChannelPromise unvoid()