|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CloseFuture
An IoFuture for asynchronous close requests.
IoSession session = ...; CloseFuture future = session.close(); // Wait until the connection is closed future.awaitUninterruptibly(); // Now connection should be closed. assert future.isClosed();
| Method Summary | |
|---|---|
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. |
| Methods inherited from interface org.apache.mina.core.future.IoFuture |
|---|
await, await, awaitUninterruptibly, awaitUninterruptibly, getSession, isDone, join, join |
| Method Detail |
|---|
boolean isClosed()
void setClosed()
CloseFuture await()
throws InterruptedException
IoFuture
await in interface IoFutureInterruptedExceptionCloseFuture awaitUninterruptibly()
IoFuture
awaitUninterruptibly in interface IoFutureCloseFuture addListener(IoFutureListener<?> listener)
IoFuture
addListener in interface IoFutureCloseFuture removeListener(IoFutureListener<?> listener)
IoFuture
removeListener in interface IoFuture
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||