Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.mina.common
Interface WriteFuture

All Superinterfaces:
  IoFuture

    public interface WriteFuture

extends IoFuture

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)
     }

Version:
  $Rev: 555855 $, $Date: 2007-07-13 05:19:00 +0200 (Fri, 13 Jul 2007) $
Author:
  The Apache Directory Project (mina-dev@directory.apache.org)

Method Summary
`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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.