📄 defaultreadfuture.html
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/DefaultReadFuture.html#isClosed()">isClosed</A></B>()</CODE><BR> Returns <tt>true</tt> if the <A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common"><CODE>IoSession</CODE></A> associated with this future has been closed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/DefaultReadFuture.html#isRead()">isRead</A></B>()</CODE><BR> Returns <tt>true</tt> if a message was received successfully.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/apache/mina/common/ReadFuture.html" title="interface in org.apache.mina.common">ReadFuture</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/DefaultReadFuture.html#removeListener(org.apache.mina.common.IoFutureListener)">removeListener</A></B>(<A HREF="../../../../org/apache/mina/common/IoFutureListener.html" title="interface in org.apache.mina.common">IoFutureListener</A><?> listener)</CODE><BR> Removes an existing event <tt>listener</tt> which is notified when the state of this future changes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/DefaultReadFuture.html#setClosed()">setClosed</A></B>()</CODE><BR> Sets the associated <A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common"><CODE>IoSession</CODE></A> is closed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/DefaultReadFuture.html#setException(java.lang.Throwable)">setException</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</A> exception)</CODE><BR> Sets the cause of the read failure, and notifies all threads waiting for this future.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/DefaultReadFuture.html#setRead(java.lang.Object)">setRead</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> message)</CODE><BR> Sets the message is written, and notifies all threads waiting for this future.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_org.apache.mina.common.DefaultIoFuture"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class org.apache.mina.common.<A HREF="../../../../org/apache/mina/common/DefaultIoFuture.html" title="class in org.apache.mina.common">DefaultIoFuture</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../org/apache/mina/common/DefaultIoFuture.html#await(long)">await</A>, <A HREF="../../../../org/apache/mina/common/DefaultIoFuture.html#await(long, java.util.concurrent.TimeUnit)">await</A>, <A HREF="../../../../org/apache/mina/common/DefaultIoFuture.html#awaitUninterruptibly(long)">awaitUninterruptibly</A>, <A HREF="../../../../org/apache/mina/common/DefaultIoFuture.html#awaitUninterruptibly(long, java.util.concurrent.TimeUnit)">awaitUninterruptibly</A>, <A HREF="../../../../org/apache/mina/common/DefaultIoFuture.html#getSession()">getSession</A>, <A HREF="../../../../org/apache/mina/common/DefaultIoFuture.html#getValue()">getValue</A>, <A HREF="../../../../org/apache/mina/common/DefaultIoFuture.html#isReady()">isReady</A>, <A HREF="../../../../org/apache/mina/common/DefaultIoFuture.html#join()">join</A>, <A HREF="../../../../org/apache/mina/common/DefaultIoFuture.html#join(long)">join</A>, <A HREF="../../../../org/apache/mina/common/DefaultIoFuture.html#setValue(java.lang.Object)">setValue</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_org.apache.mina.common.IoFuture"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from interface org.apache.mina.common.<A HREF="../../../../org/apache/mina/common/IoFuture.html" title="interface in org.apache.mina.common">IoFuture</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../org/apache/mina/common/IoFuture.html#await(long)">await</A>, <A HREF="../../../../org/apache/mina/common/IoFuture.html#await(long, java.util.concurrent.TimeUnit)">await</A>, <A HREF="../../../../org/apache/mina/common/IoFuture.html#awaitUninterruptibly(long)">awaitUninterruptibly</A>, <A HREF="../../../../org/apache/mina/common/IoFuture.html#awaitUninterruptibly(long, java.util.concurrent.TimeUnit)">awaitUninterruptibly</A>, <A HREF="../../../../org/apache/mina/common/IoFuture.html#getSession()">getSession</A>, <A HREF="../../../../org/apache/mina/common/IoFuture.html#isReady()">isReady</A>, <A HREF="../../../../org/apache/mina/common/IoFuture.html#join()">join</A>, <A HREF="../../../../org/apache/mina/common/IoFuture.html#join(long)">join</A></CODE></TD></TR></TABLE> <P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="DefaultReadFuture(org.apache.mina.common.IoSession)"><!-- --></A><H3>DefaultReadFuture</H3><PRE>public <B>DefaultReadFuture</B>(<A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">IoSession</A> session)</PRE><DL><DD>Creates a new instance.<P></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getMessage()"><!-- --></A><H3>getMessage</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>getMessage</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/mina/common/ReadFuture.html#getMessage()">ReadFuture</A></CODE></B></DD><DD>Returns the received message. It returns <tt>null</tt> if this future is not ready or the associated <A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common"><CODE>IoSession</CODE></A> has been closed.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/mina/common/ReadFuture.html#getMessage()">getMessage</A></CODE> in interface <CODE><A HREF="../../../../org/apache/mina/common/ReadFuture.html" title="interface in org.apache.mina.common">ReadFuture</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="isRead()"><!-- --></A><H3>isRead</H3><PRE>public boolean <B>isRead</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/mina/common/ReadFuture.html#isRead()">ReadFuture</A></CODE></B></DD><DD>Returns <tt>true</tt> if a message was received successfully.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/mina/common/ReadFuture.html#isRead()">isRead</A></CODE> in interface <CODE><A HREF="../../../../org/apache/mina/common/ReadFuture.html" title="interface in org.apache.mina.common">ReadFuture</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="isClosed()"><!-- --></A><H3>isClosed</H3><PRE>public boolean <B>isClosed</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/mina/common/ReadFuture.html#isClosed()">ReadFuture</A></CODE></B></DD><DD>Returns <tt>true</tt> if the <A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common"><CODE>IoSession</CODE></A> associated with this future has been closed.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/mina/common/ReadFuture.html#isClosed()">isClosed</A></CODE> in interface <CODE><A HREF="../../../../org/apache/mina/common/ReadFuture.html" title="interface in org.apache.mina.common">ReadFuture</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getException()"><!-- --></A><H3>getException</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</A> <B>getException</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/mina/common/ReadFuture.html#getException()">ReadFuture</A></CODE></B></DD><DD>Returns the cause of the read failure if and only if the read operation has failed due to an <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang"><CODE>Exception</CODE></A>. Otherwise, <tt>null</tt> is returned.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/mina/common/ReadFuture.html#getException()">getException</A></CODE> in interface <CODE><A HREF="../../../../org/apache/mina/common/ReadFuture.html" title="interface in org.apache.mina.common">ReadFuture</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setClosed()"><!-- --></A><H3>setClosed</H3><PRE>public void <B>setClosed</B>()</PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -