public interface IoFuture
IoSession.
Can be listened for completion using a IoFutureListener.| Modifier and Type | Method and Description |
|---|---|
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() |
boolean |
isDone() |
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. |
IoFuture await() throws InterruptedException
InterruptedException - If the thread is interrupted while waitingboolean await(long timeout,
TimeUnit unit)
throws InterruptedException
timeout - The maximum delay to wait before getting outunit - the type of unit for the delay (seconds, minutes...)true if the operation is completed.InterruptedException - If the thread is interrupted while waitingboolean await(long timeoutMillis)
throws InterruptedException
timeoutMillis - The maximum milliseconds to wait before getting outtrue if the operation is completed.InterruptedException - If the thread is interrupted while waitingIoFuture awaitUninterruptibly()
boolean awaitUninterruptibly(long timeout,
TimeUnit unit)
timeout - The maximum delay to wait before getting outunit - the type of unit for the delay (seconds, minutes...)true if the operation is completed.boolean awaitUninterruptibly(long timeoutMillis)
timeoutMillis - The maximum milliseconds to wait before getting outtrue if the operation is finished.@Deprecated void join()
awaitUninterruptibly().@Deprecated boolean join(long timeoutMillis)
awaitUninterruptibly(long).timeoutMillis - The time to wait for the join before bailing outtrue if the join was successfulboolean isDone()
true if the operation is completed.IoFuture addListener(IoFutureListener<?> listener)
listener which is notified when
this future is completed. If the listener is added
after the completion, the listener is directly notified.listener - The listener to addIoFuture removeListener(IoFutureListener<?> listener)
listener so it won't be notified when
the future is completed.listener - The listener to removeCopyright © 2004–2024 Apache MINA Project. All rights reserved.