public class DefaultIoFuture extends java.lang.Object implements IoFuture
IoFuture
.Constructor and Description |
---|
DefaultIoFuture(IoSession session)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
IoFuture |
addListener(IoFutureListener<?> listener)
Adds an event listener which is notified when
the state of this future changes.
|
IoFuture |
await()
Wait for the asynchronous operation to end.
|
boolean |
await(long timeoutMillis)
Wait for the asynchronous operation to end with the specified timeout.
|
boolean |
await(long timeout,
java.util.concurrent.TimeUnit unit)
Wait for the asynchronous operation to end with the specified timeout.
|
IoFuture |
awaitUninterruptibly()
Wait for the asynchronous operation to end uninterruptibly.
|
boolean |
awaitUninterruptibly(long timeoutMillis)
Wait for the asynchronous operation to end with the specified timeout
uninterruptibly.
|
boolean |
awaitUninterruptibly(long timeout,
java.util.concurrent.TimeUnit unit)
Wait for the asynchronous operation to end with the specified timeout
uninterruptibly.
|
IoSession |
getSession()
Returns the
IoSession which is associated with this future. |
protected java.lang.Object |
getValue()
Returns the result of the asynchronous operation.
|
boolean |
isReady()
Returns if the asynchronous operation is finished.
|
void |
join() |
boolean |
join(long timeoutMillis) |
IoFuture |
removeListener(IoFutureListener<?> listener)
Removes an existing event listener which is notified when
the state of this future changes.
|
protected void |
setValue(java.lang.Object newValue)
Sets the result of the asynchronous operation, and mark it as finished.
|
public IoSession getSession()
IoFuture
IoSession
which is associated with this future.getSession
in interface IoFuture
public IoFuture await() throws java.lang.InterruptedException
IoFuture
public boolean await(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
IoFuture
public boolean await(long timeoutMillis) throws java.lang.InterruptedException
IoFuture
public IoFuture awaitUninterruptibly()
IoFuture
awaitUninterruptibly
in interface IoFuture
public boolean awaitUninterruptibly(long timeout, java.util.concurrent.TimeUnit unit)
IoFuture
awaitUninterruptibly
in interface IoFuture
public boolean awaitUninterruptibly(long timeoutMillis)
IoFuture
awaitUninterruptibly
in interface IoFuture
public boolean isReady()
IoFuture
protected void setValue(java.lang.Object newValue)
protected java.lang.Object getValue()
public IoFuture addListener(IoFutureListener<?> listener)
IoFuture
addListener
in interface IoFuture
public IoFuture removeListener(IoFutureListener<?> listener)
IoFuture
removeListener
in interface IoFuture
Copyright © 2004-2019 Apache MINA Project. All Rights Reserved.