| 构造器和说明 |
|---|
DefaultIoFuture(IoSession session)
Creates a new instance.
|
DefaultIoFuture(IoSession session,
java.lang.Object lock)
Creates a new instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
public DefaultIoFuture(IoSession session)
session - an IoSession which is associated with this futurepublic IoSession getSession()
IoFutureIoSession which is associated with this future.getSession 在接口中 IoFuturepublic java.lang.Object getLock()
IoFuturepublic void join()
IoFuturepublic boolean join(long timeoutMillis)
IoFuturepublic boolean isReady()
IoFutureprotected void setValue(java.lang.Object newValue)
protected java.lang.Object getValue()
public void addListener(IoFutureListener listener)
IoFutureaddListener 在接口中 IoFuturepublic void removeListener(IoFutureListener listener)
IoFutureremoveListener 在接口中 IoFuture