|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.common.DefaultIoFuture
public class DefaultIoFuture
A default implementation of IoFuture
.
Constructor Summary | |
---|---|
DefaultIoFuture(IoSession session)
Creates a new instance. |
Method Summary | |
---|---|
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,
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,
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 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(Object newValue)
Sets the result of the asynchronous operation, and mark it as finished. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultIoFuture(IoSession session)
session
- an IoSession
which is associated with this futureMethod Detail |
---|
public IoSession getSession()
IoFuture
IoSession
which is associated with this future.
getSession
in interface IoFuture
public void join()
join
in interface IoFuture
public boolean join(long timeoutMillis)
join
in interface IoFuture
public IoFuture await() throws InterruptedException
IoFuture
await
in interface IoFuture
InterruptedException
public boolean await(long timeout, TimeUnit unit) throws InterruptedException
IoFuture
await
in interface IoFuture
InterruptedException
public boolean await(long timeoutMillis) throws InterruptedException
IoFuture
await
in interface IoFuture
InterruptedException
public IoFuture awaitUninterruptibly()
IoFuture
awaitUninterruptibly
in interface IoFuture
public boolean awaitUninterruptibly(long timeout, TimeUnit unit)
IoFuture
awaitUninterruptibly
in interface IoFuture
public boolean awaitUninterruptibly(long timeoutMillis)
IoFuture
awaitUninterruptibly
in interface IoFuture
public boolean isReady()
IoFuture
isReady
in interface IoFuture
protected void setValue(Object newValue)
protected Object getValue()
public IoFuture addListener(IoFutureListener<?> listener)
IoFuture
addListener
in interface IoFuture
public IoFuture removeListener(IoFutureListener<?> listener)
IoFuture
removeListener
in interface IoFuture
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |