Package org.apache.mina.common
Interface IoFuture
-
- All Known Subinterfaces:
CloseFuture
,ConnectFuture
,WriteFuture
- All Known Implementing Classes:
DefaultCloseFuture
,DefaultConnectFuture
,DefaultIoFuture
,DefaultWriteFuture
public interface IoFuture
Represents the result of an ashynchronous I/O operation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 theIoSession
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.
-
-
-
Method Detail
-
getLock
java.lang.Object getLock()
Returns the lock object this future acquires.
-
join
void join()
Wait for the asynchronous operation to end.
-
join
boolean join(long timeoutInMillis)
Wait for the asynchronous operation to end with the specified timeout.- Returns:
- true if the operation is finished.
-
isReady
boolean isReady()
Returns if the asynchronous operation is finished.
-
addListener
void addListener(IoFutureListener listener)
Adds an event listener which is notified when the state of this future changes.
-
removeListener
void removeListener(IoFutureListener listener)
Removes an existing event listener which is notified when the state of this future changes.
-
-