public class DefaultChannelPromise extends DefaultPromise<java.lang.Void> implements ChannelPromise
ChannelPromise实现。
建议使用ChannelOutboundInvoker.newPromise()创建新的ChannelPromise,而不是显式调用构造函数。
| Constructor and Description |
|---|
DefaultChannelPromise(Channel channel)
创建一个新的实例。
|
DefaultChannelPromise(Channel channel, EventExecutor executor)
创建一个新的实例。
|
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isCancelled, isDone, isSuccess, notifyListener, setUncancellable, toString, toStringBuilder, tryFailure, trySuccessget, getclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetUncancellable, tryFailure, trySuccessawait, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isSuccesspublic DefaultChannelPromise(Channel channel)
channel - 与此未来相关的Channel
public DefaultChannelPromise(Channel channel, EventExecutor executor)
channel - 与此未来相关的Channel
protected EventExecutor executor()
DefaultPromise
假定该执行者将防止StackOverflowError例外。 如果堆栈深度超过阈值,执行程序可以通过执行Runnable来避免StackOverflowError 。
executor在课程
DefaultPromise<java.lang.Void>
public Channel channel()
ChannelFuture
channel接口
ChannelFuture
channel接口
ChannelPromise
public ChannelPromise setSuccess()
setSuccess在界面
ChannelPromise
public ChannelPromise setSuccess(java.lang.Void result)
Promise复制的描述
IllegalStateException 。
setSuccess在界面
ChannelPromise
setSuccess在界面
Promise<java.lang.Void>
setSuccess在课堂上
DefaultPromise<java.lang.Void>
public boolean trySuccess()
trySuccess接口
ChannelPromise
public ChannelPromise setFailure(java.lang.Throwable cause)
Promise
IllegalStateException 。
setFailure接口
ChannelPromise
setFailure接口
Promise<java.lang.Void>
setFailure
DefaultPromise<java.lang.Void>
public ChannelPromise addListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Future
addListener在界面
ChannelFuture
addListener接口
ChannelPromise
addListener接口
Promise<java.lang.Void>
addListener在课堂上
DefaultPromise<java.lang.Void>
public ChannelPromise addListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Future
addListeners接口
ChannelFuture
addListeners接口
ChannelPromise
addListeners在界面
Promise<java.lang.Void>
addListeners在课堂上
DefaultPromise<java.lang.Void>
public ChannelPromise removeListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Future复制的描述
removeListener在界面
ChannelFuture
removeListener ,界面
ChannelPromise
removeListener接口
Promise<java.lang.Void>
removeListener在课堂上
DefaultPromise<java.lang.Void>
public ChannelPromise removeListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Future
removeListeners在界面
ChannelFuture
removeListeners接口
ChannelPromise
removeListeners在界面
Promise<java.lang.Void>
removeListeners在课堂上
DefaultPromise<java.lang.Void>
public ChannelPromise sync() throws java.lang.InterruptedException
Future复制的描述
sync接口
ChannelFuture
sync接口
ChannelPromise
sync在界面
Promise<java.lang.Void>
sync
DefaultPromise<java.lang.Void>
java.lang.InterruptedException
public ChannelPromise syncUninterruptibly()
Future
syncUninterruptibly ,界面
ChannelFuture
syncUninterruptibly在界面
ChannelPromise
syncUninterruptibly接口
Promise<java.lang.Void>
syncUninterruptibly ,上课
DefaultPromise<java.lang.Void>
public ChannelPromise await() throws java.lang.InterruptedException
Future
await在界面
ChannelFuture
await在界面
ChannelPromise
await在界面
Promise<java.lang.Void>
await在课堂上
DefaultPromise<java.lang.Void>
java.lang.InterruptedException - 如果当前线程中断
public ChannelPromise awaitUninterruptibly()
Future
InterruptedException并以静默方式丢弃它。
awaitUninterruptibly接口
ChannelFuture
awaitUninterruptibly ,界面
ChannelPromise
awaitUninterruptibly ,界面
Promise<java.lang.Void>
awaitUninterruptibly
DefaultPromise<java.lang.Void>
public long flushCheckpoint()
public void flushCheckpoint(long checkpoint)
public ChannelPromise promise()
protected void checkDeadLock()
checkDeadLock在课堂上
DefaultPromise<java.lang.Void>
public ChannelPromise unvoid()
ChannelPromise复制的描述
ChannelFuture.isVoid()本身返回true则返回新的ChannelPromise 。
unvoid接口
ChannelPromise
public boolean isVoid()
ChannelFuture
ChannelFuture是无效未来,并且不允许调用以下任何方法,则返回true :
isVoid ,界面
ChannelFuture
Copyright © 2008–2018 The Netty Project. All rights reserved.