|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.core.future.DefaultIoFuture
public class DefaultIoFuture
A default implementation of IoFuture
associated with
an IoSession
.
Constructor Summary | |
---|---|
DefaultIoFuture(IoSession session)
Creates a new instance associated with an IoSession . |
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. |
protected Object |
getValue()
Returns the result of the asynchronous operation. |
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. |
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)
IoSession
.
session
- an IoSession
which is associated with this futureMethod Detail |
---|
public IoSession getSession()
IoSession
which is associated with this future.
getSession
in interface IoFuture
@Deprecated public void join()
awaitUninterruptibly()
.
join
in interface IoFuture
@Deprecated public boolean join(long timeoutMillis)
awaitUninterruptibly(long)
.
join
in interface IoFuture
public IoFuture await() throws InterruptedException
await
in interface IoFuture
InterruptedException
public boolean await(long timeout, TimeUnit unit) throws InterruptedException
await
in interface IoFuture
InterruptedException
public boolean await(long timeoutMillis) throws InterruptedException
await
in interface IoFuture
InterruptedException
public IoFuture awaitUninterruptibly()
awaitUninterruptibly
in interface IoFuture
public boolean awaitUninterruptibly(long timeout, TimeUnit unit)
awaitUninterruptibly
in interface IoFuture
public boolean awaitUninterruptibly(long timeoutMillis)
awaitUninterruptibly
in interface IoFuture
public boolean isDone()
isDone
in interface IoFuture
public void setValue(Object newValue)
protected Object getValue()
public IoFuture addListener(IoFutureListener<?> listener)
addListener
in interface IoFuture
public IoFuture removeListener(IoFutureListener<?> listener)
removeListener
in interface IoFuture
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |