public class DefaultReadFuture extends DefaultIoFuture implements ReadFuture
WriteFuture.| 构造器和说明 | 
|---|
| DefaultReadFuture(IoSession session)Creates a new instance. | 
| 限定符和类型 | 方法和说明 | 
|---|---|
| ReadFuture | addListener(IoFutureListener<?> listener)Adds an event listener which is notified when
 this future is completed. | 
| ReadFuture | await()Wait for the asynchronous operation to complete. | 
| ReadFuture | awaitUninterruptibly()Wait for the asynchronous operation to complete uninterruptibly. | 
| java.lang.Throwable | getException() | 
| java.lang.Object | getMessage()Get the read message. | 
| boolean | isClosed() | 
| boolean | isRead() | 
| ReadFuture | removeListener(IoFutureListener<?> listener)Removes an existing event listener so it won't be notified when
 the future is completed. | 
| void | setClosed()Sets the associated  IoSessionis closed. | 
| void | setException(java.lang.Throwable exception)Sets the cause of the read failure, and notifies all threads waiting
 for this future. | 
| void | setRead(java.lang.Object message)Sets the message is written, and notifies all threads waiting for
 this future. | 
await, await, awaitUninterruptibly, awaitUninterruptibly, getSession, getValue, isDone, join, join, setValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitawait, await, awaitUninterruptibly, awaitUninterruptibly, getSession, isDone, join, joinpublic DefaultReadFuture(IoSession session)
session - The associated sessionpublic java.lang.Object getMessage()
getMessage 在接口中 ReadFutureIoSession has been closed.public boolean isRead()
isRead 在接口中 ReadFuturepublic boolean isClosed()
isClosed 在接口中 ReadFutureIoSession associated with this
 future has been closed.public java.lang.Throwable getException()
getException 在接口中 ReadFutureException.  Otherwise,
 null is returned.public void setClosed()
IoSession is closed.  This method is invoked
 by MINA internally.  Please do not call this method directly.setClosed 在接口中 ReadFuturepublic void setRead(java.lang.Object message)
setRead 在接口中 ReadFuturemessage - The received message to store in this futurepublic void setException(java.lang.Throwable exception)
setException 在接口中 ReadFutureexception - The exception to store in the Future instancepublic ReadFuture await() throws java.lang.InterruptedException
await 在接口中 IoFutureawait 在接口中 ReadFutureawait 在类中 DefaultIoFuturejava.lang.InterruptedException - If the thread is interrupted while waitingpublic ReadFuture awaitUninterruptibly()
awaitUninterruptibly 在接口中 IoFutureawaitUninterruptibly 在接口中 ReadFutureawaitUninterruptibly 在类中 DefaultIoFuturepublic ReadFuture addListener(IoFutureListener<?> listener)
addListener 在接口中 IoFutureaddListener 在接口中 ReadFutureaddListener 在类中 DefaultIoFuturelistener - The listener to addpublic ReadFuture removeListener(IoFutureListener<?> listener)
removeListener 在接口中 IoFutureremoveListener 在接口中 ReadFutureremoveListener 在类中 DefaultIoFuturelistener - The listener to remove