public class DefaultCloseFuture extends DefaultIoFuture implements CloseFuture
CloseFuture
.构造器和说明 |
---|
DefaultCloseFuture(IoSession session)
Creates a new instance.
|
限定符和类型 | 方法和说明 |
---|---|
CloseFuture |
addListener(IoFutureListener<?> listener)
Adds an event listener which is notified when
this future is completed.
|
CloseFuture |
await()
Wait for the asynchronous operation to complete.
|
CloseFuture |
awaitUninterruptibly()
Wait for the asynchronous operation to complete uninterruptibly.
|
boolean |
isClosed() |
CloseFuture |
removeListener(IoFutureListener<?> listener)
Removes an existing event listener so it won't be notified when
the future is completed.
|
void |
setClosed()
Marks this future as closed and notifies all threads waiting for this
future.
|
await, await, awaitUninterruptibly, awaitUninterruptibly, getSession, getValue, isDone, join, join, setValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
await, await, awaitUninterruptibly, awaitUninterruptibly, getSession, isDone, join, join
public DefaultCloseFuture(IoSession session)
session
- The associated sessionpublic boolean isClosed()
isClosed
在接口中 CloseFuture
public void setClosed()
setClosed
在接口中 CloseFuture
public CloseFuture await() throws java.lang.InterruptedException
await
在接口中 CloseFuture
await
在接口中 IoFuture
await
在类中 DefaultIoFuture
java.lang.InterruptedException
- If the thread is interrupted while waitingpublic CloseFuture awaitUninterruptibly()
awaitUninterruptibly
在接口中 CloseFuture
awaitUninterruptibly
在接口中 IoFuture
awaitUninterruptibly
在类中 DefaultIoFuture
public CloseFuture addListener(IoFutureListener<?> listener)
addListener
在接口中 CloseFuture
addListener
在接口中 IoFuture
addListener
在类中 DefaultIoFuture
listener
- The listener to addpublic CloseFuture removeListener(IoFutureListener<?> listener)
removeListener
在接口中 CloseFuture
removeListener
在接口中 IoFuture
removeListener
在类中 DefaultIoFuture
listener
- The listener to remove