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...)InterruptedException
- If the thread is interrupted while waitingboolean await(long timeoutMillis) throws InterruptedException
timeoutMillis
- The maximum milliseconds to wait before getting outInterruptedException
- 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...)boolean awaitUninterruptibly(long timeoutMillis)
timeoutMillis
- The maximum milliseconds to wait before getting out@Deprecated void join()
awaitUninterruptibly()
.@Deprecated boolean join(long timeoutMillis)
awaitUninterruptibly(long)
.timeoutMillis
- The time to wait for the join before bailing outboolean isDone()
IoFuture addListener(IoFutureListener<?> listener)
listener
- The listener to addIoFuture removeListener(IoFutureListener<?> listener)
listener
- The listener to removeCopyright © 2004–2021 Apache MINA Project. All rights reserved.