Package org.apache.mina.common
Interface WriteFuture
-
- All Superinterfaces:
IoFuture
- All Known Implementing Classes:
DefaultWriteFuture
public interface WriteFuture extends IoFuture
AnIoFuture
for asynchronous write requests.Example
IoSession session = ...; WriteFuture future = session.write(...); // Wait until the message is completely written out to the O/S buffer. future.join(); if( future.isWritten() ) { // The message has been written successfully. } else { // The messsage couldn't be written out completely for some reason. // (e.g. Connection is closed) }
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isWritten()
Returns true if the write operation is finished successfully.void
setWritten(boolean written)
Sets whether the message is written or not, and notifies all threads waiting for this future.-
Methods inherited from interface org.apache.mina.common.IoFuture
addListener, getLock, getSession, isReady, join, join, removeListener
-
-
-
-
Method Detail
-
isWritten
boolean isWritten()
Returns true if the write operation is finished successfully.
-
setWritten
void setWritten(boolean written)
Sets whether the message is written or not, and notifies all threads waiting for this future. This method is invoked by MINA internally. Please do not call this method directly.
-
-