org.apache.mina.common
Interface IoFuture
- CloseFuture, ConnectFuture, WriteFuture
- DefaultCloseFuture, DefaultConnectFuture, DefaultIoFuture, DefaultWriteFuture
public interface IoFuture
Represents the result of an ashynchronous I/O operation.
void | addListener(IoFutureListener listener) - Adds an event listener which is notified when
the state of this future changes.
|
Object | getLock() - Returns the lock object this future acquires.
|
IoSession | getSession() - Returns the
IoSession which is associated with this future.
|
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 | removeListener(IoFutureListener listener) - Removes an existing event listener which is notified when
the state of this future changes.
|
addListener
public void addListener(IoFutureListener listener)
Adds an event listener which is notified when
the state of this future changes.
getLock
public Object getLock()
Returns the lock object this future acquires.
getSession
public IoSession getSession()
Returns the
IoSession
which is associated with this future.
isReady
public boolean isReady()
Returns if the asynchronous operation is finished.
join
public void join()
Wait for the asynchronous operation to end.
join
public boolean join(long timeoutInMillis)
Wait for the asynchronous operation to end with the specified timeout.
- true if the operation is finished.
removeListener
public void removeListener(IoFutureListener listener)
Removes an existing event listener which is notified when
the state of this future changes.