public class DefaultCloseFuture extends DefaultIoFuture implements CloseFuture
CloseFuture.| Constructor and Description |
|---|
DefaultCloseFuture(IoSession session)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
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()
Returns true if the close request is finished and the session is closed.
|
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, setValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitawait, await, awaitUninterruptibly, awaitUninterruptibly, getSession, isDone, join, joinpublic DefaultCloseFuture(IoSession session)
public boolean isClosed()
CloseFutureisClosed in interface CloseFuturepublic void setClosed()
CloseFuturesetClosed in interface CloseFuturepublic CloseFuture await() throws InterruptedException
DefaultIoFutureawait in interface CloseFutureawait in interface IoFutureawait in class DefaultIoFutureInterruptedExceptionpublic CloseFuture awaitUninterruptibly()
DefaultIoFutureawaitUninterruptibly in interface CloseFutureawaitUninterruptibly in interface IoFutureawaitUninterruptibly in class DefaultIoFuturepublic CloseFuture addListener(IoFutureListener<?> listener)
DefaultIoFutureaddListener in interface CloseFutureaddListener in interface IoFutureaddListener in class DefaultIoFuturepublic CloseFuture removeListener(IoFutureListener<?> listener)
DefaultIoFutureremoveListener in interface CloseFutureremoveListener in interface IoFutureremoveListener in class DefaultIoFuture