|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.common.support.DefaultIoFuture
public class DefaultIoFuture
A default implementation of IoFuture
.
Constructor Summary | |
---|---|
DefaultIoFuture(IoSession session)
Creates a new instance. |
|
DefaultIoFuture(IoSession session,
java.lang.Object lock)
Creates a new instance. |
Method Summary | |
---|---|
void |
addListener(IoFutureListener listener)
Adds an event listener which is notified when the state of this future changes. |
java.lang.Object |
getLock()
Returns the lock object this future acquires. |
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()
Wait for the asynchronous operation to end. |
boolean |
join(long timeoutMillis)
Wait for the asynchronous operation to end with the specified timeout. |
void |
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. |
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 futurepublic DefaultIoFuture(IoSession session, java.lang.Object lock)
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 java.lang.Object getLock()
IoFuture
getLock
in interface IoFuture
public void join()
IoFuture
join
in interface IoFuture
public boolean join(long timeoutMillis)
IoFuture
join
in interface IoFuture
public boolean isReady()
IoFuture
isReady
in interface IoFuture
protected void setValue(java.lang.Object newValue)
protected java.lang.Object getValue()
public void addListener(IoFutureListener listener)
IoFuture
addListener
in interface IoFuture
public void removeListener(IoFutureListener listener)
IoFuture
removeListener
in interface IoFuture
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |