|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.common.IoFuture
public class IoFuture
Represents the result of an ashynchronous I/O operation.
Nested Class Summary | |
---|---|
static interface |
IoFuture.Callback
Something interested in being notified when the result of an IoFuture becomes available. |
Constructor Summary | |
---|---|
IoFuture()
Creates a new instance. |
|
IoFuture(Object lock)
Creates a new instance which uses the specified object as a lock. |
Method Summary | |
---|---|
IoFuture.Callback |
getCallback()
Returns a IoFuture.Callback which is associated with this future. |
Object |
getLock()
Returns the lock object this future acquires. |
protected 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 timeoutInMillis)
Wait for the asynchronous operation to end with the specified timeout. |
void |
setCallback(IoFuture.Callback callback)
Sets a IoFuture.Callback to be notified when a result
becomes available. |
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 IoFuture()
public IoFuture(Object lock)
Method Detail |
---|
public Object getLock()
public void join()
public boolean join(long timeoutInMillis)
public boolean isReady()
protected void setValue(Object newValue)
protected Object getValue()
public IoFuture.Callback getCallback()
IoFuture.Callback
which is associated with this future.
public void setCallback(IoFuture.Callback callback)
IoFuture.Callback
to be notified when a result
becomes available. If tth result has already become obtained,
the specified callback is notified immediately
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |