|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IoFuture
Represents the completion of an asynchronous I/O operation on an
IoSession
.
Can be listened for completion using a IoFutureListener
.
Method Summary | |
---|---|
IoFuture |
addListener(IoFutureListener<?> listener)
Adds an event listener which is notified when this future is completed. |
IoFuture |
await()
Wait for the asynchronous operation to complete. |
boolean |
await(long timeoutMillis)
Wait for the asynchronous operation to complete with the specified timeout. |
boolean |
await(long timeout,
TimeUnit unit)
Wait for the asynchronous operation to complete with the specified timeout. |
IoFuture |
awaitUninterruptibly()
Wait for the asynchronous operation to complete uninterruptibly. |
boolean |
awaitUninterruptibly(long timeoutMillis)
Wait for the asynchronous operation to complete with the specified timeout uninterruptibly. |
boolean |
awaitUninterruptibly(long timeout,
TimeUnit unit)
Wait for the asynchronous operation to complete with the specified timeout uninterruptibly. |
IoSession |
getSession()
Returns the IoSession which is associated with this future. |
boolean |
isDone()
Returns if the asynchronous operation is completed. |
void |
join()
Deprecated. Replaced with awaitUninterruptibly() . |
boolean |
join(long timeoutMillis)
Deprecated. Replaced with awaitUninterruptibly(long) . |
IoFuture |
removeListener(IoFutureListener<?> listener)
Removes an existing event listener so it won't be notified when the future is completed. |
Method Detail |
---|
IoSession getSession()
IoSession
which is associated with this future.
IoFuture await() throws InterruptedException
InterruptedException
boolean await(long timeout, TimeUnit unit) throws InterruptedException
InterruptedException
boolean await(long timeoutMillis) throws InterruptedException
InterruptedException
IoFuture awaitUninterruptibly()
boolean awaitUninterruptibly(long timeout, TimeUnit unit)
boolean awaitUninterruptibly(long timeoutMillis)
@Deprecated void join()
awaitUninterruptibly()
.
@Deprecated boolean join(long timeoutMillis)
awaitUninterruptibly(long)
.
boolean isDone()
IoFuture addListener(IoFutureListener<?> listener)
IoFuture removeListener(IoFutureListener<?> listener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |