public interface WriteFuture extends IoFuture
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) }
限定符和类型 | 方法和说明 |
---|---|
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.
|
addListener, getLock, getSession, isReady, join, join, removeListener
boolean isWritten()
void setWritten(boolean written)