|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||
java.lang.Objectorg.jboss.netty.channel.CompleteChannelFuture
public abstract class CompleteChannelFuture

表示一个已经完成的ChannelFuture的脚架实现.
| 方法摘要 | |
|---|---|
void |
addListener(ChannelFutureListener listener)
添加指定的监听器到该future.当该future完成 ,该监听器会收到通知.如果该future已经完成,指定的监听器也会立刻收到通知. |
ChannelFuture |
await()
等待该future完成 |
boolean |
await(long timeoutMillis)
在指定的时间限制内等待future的完成. |
boolean |
await(long timeout,
java.util.concurrent.TimeUnit unit)
在指定的时间限制内等待future的完成. |
ChannelFuture |
awaitUninterruptibly()
等待该future完成.该方法会捕捉 InterruptedException并安静丢弃. |
boolean |
awaitUninterruptibly(long timeoutMillis)
在指定的时间限制内等待future的完成.该方法会捕捉 InterruptedException并丢弃异常. |
boolean |
awaitUninterruptibly(long timeout,
java.util.concurrent.TimeUnit unit)
在指定的时间限制内等待future的完成.该方法会捕捉 InterruptedException并丢弃异常. |
boolean |
cancel()
取消该future关联的I/O操作,如果取消成功则通知所有监听器. |
Channel |
getChannel()
返回该future关联发生I/O操作的Channel. |
boolean |
isCancelled()
只有该future被使用 ChannelFuture.cancel()方法取消才返回true. |
boolean |
isDone()
只有当该future完成了返回true,不管操作是否成功、失败或取消. |
void |
removeListener(ChannelFutureListener listener)
移除该future里指定的监听器.当该future完成 ,该监听器会收到通知.如果指定的监听器不再关联该future,该方法不做任何事. |
boolean |
setFailure(java.lang.Throwable cause)
标识该future为失败并通知所有监听器. |
boolean |
setProgress(long amount,
long current,
long total)
通知实现 ChannelFutureProgressListener接口的监听器该操作的进度. |
boolean |
setSuccess()
标识该future为成功并通知所有监听器. |
| 从类 java.lang.Object 继承的方法 |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 从接口 org.jboss.netty.channel.ChannelFuture 继承的方法 |
|---|
getCause, isSuccess |
| 方法详细信息 |
|---|
public void addListener(ChannelFutureListener listener)
ChannelFuture 复制的描述
ChannelFuture 中的 addListenerpublic void removeListener(ChannelFutureListener listener)
ChannelFuture 复制的描述
ChannelFuture 中的 removeListener
public ChannelFuture await()
throws java.lang.InterruptedException
ChannelFuture 复制的描述
ChannelFuture 中的 awaitjava.lang.InterruptedException - 如果当前线程被打断则抛出异常
public boolean await(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
ChannelFuture 复制的描述
ChannelFuture 中的 awaitjava.lang.InterruptedException - 如果当前线程被打断则抛出异常
public boolean await(long timeoutMillis)
throws java.lang.InterruptedException
ChannelFuture 复制的描述
ChannelFuture 中的 awaitjava.lang.InterruptedException - 如果当前线程被打断则抛出异常public ChannelFuture awaitUninterruptibly()
ChannelFuture 复制的描述InterruptedException并安静丢弃.
ChannelFuture 中的 awaitUninterruptibly
public boolean awaitUninterruptibly(long timeout,
java.util.concurrent.TimeUnit unit)
ChannelFuture 复制的描述InterruptedException并丢弃异常.
ChannelFuture 中的 awaitUninterruptiblypublic boolean awaitUninterruptibly(long timeoutMillis)
ChannelFuture 复制的描述InterruptedException并丢弃异常.
ChannelFuture 中的 awaitUninterruptiblypublic Channel getChannel()
ChannelFuture 复制的描述
ChannelFuture 中的 getChannelpublic boolean isDone()
ChannelFuture 复制的描述
ChannelFuture 中的 isDone
public boolean setProgress(long amount,
long current,
long total)
ChannelFuture 复制的描述ChannelFutureProgressListener接口的监听器该操作的进度.
请注意如果该future已经完成则该方法不会做任何事直接返回false.
ChannelFuture 中的 setProgresstrue if and only if notification was made.public boolean setFailure(java.lang.Throwable cause)
ChannelFuture 复制的描述
ChannelFuture 中的 setFailuretrue.如果该future已经被标识过成功或失败则返回
false.public boolean setSuccess()
ChannelFuture 复制的描述
ChannelFuture 中的 setSuccesstrue.如果该future已经被标识过成功或失败则返回
false.public boolean cancel()
ChannelFuture 复制的描述
ChannelFuture 中的 canceltrue.如果操作不被取消或已经完成则返回false.public boolean isCancelled()
ChannelFuture 复制的描述ChannelFuture.cancel()方法取消才返回true.
ChannelFuture 中的 isCancelled
|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||