| org.apache.mina.common.WriteFuture
All known Subclasses: org.apache.mina.common.DefaultWriteFuture,
WriteFuture | public interface WriteFuture extends IoFuture(Code) | | An
IoFuture 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)
}
author: The Apache MINA Project (dev@mina.apache.org) version: $Rev: 591310 $, $Date: 2007-11-02 05:57:00 -0600 (Fri, 02 Nov 2007) $ |
getException | Throwable getException()(Code) | | Returns the cause of the write failure if and only if the write
operation has failed due to an
Exception . Otherwise,
null is returned.
|
isWritten | boolean isWritten()(Code) | | Returns true if the write operation is finished successfully.
|
setException | void setException(Throwable cause)(Code) | | Sets the cause of the write failure, and notifies all threads waiting
for this future. This method is invoked by MINA internally. Please
do not call this method directly.
|
setWritten | void setWritten()(Code) | | Sets the message is written, and notifies all threads waiting for
this future. This method is invoked by MINA internally. Please do
not call this method directly.
|
|
|