|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.common.IoFuture
org.apache.mina.common.WriteFuture
public class WriteFuture
An IoFuture
for asynchronous write requests.
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) }
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.mina.common.IoFuture |
---|
IoFuture.Callback |
Constructor Summary | |
---|---|
WriteFuture()
Creates a new instance. |
|
WriteFuture(Object lock)
Creates a new instance which uses the specified object as a lock. |
Method Summary | |
---|---|
boolean |
isWritten()
Returns true if the write operation is finished successfully. |
static WriteFuture |
newNotWrittenFuture()
Returns a new WriteFuture which is already marked as 'not written'. |
static WriteFuture |
newWrittenFuture()
Returns a new WriteFuture which is already marked as 'written'. |
void |
setWritten(boolean written)
This method is invoked by MINA internally. |
Methods inherited from class org.apache.mina.common.IoFuture |
---|
getCallback, getLock, getValue, isReady, join, join, setCallback, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WriteFuture()
public WriteFuture(Object lock)
Method Detail |
---|
public static WriteFuture newWrittenFuture()
WriteFuture
which is already marked as 'written'.
public static WriteFuture newNotWrittenFuture()
WriteFuture
which is already marked as 'not written'.
public boolean isWritten()
public void setWritten(boolean written)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |