⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ioservice.html

📁 MINA+API 关于MINA的API
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoService.html#isActive()">isActive</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a value of whether or not this service is active</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoService.html#isBothIdle()">isBothIdle</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if this service is <A HREF="../../../../org/apache/mina/common/IdleStatus.html#BOTH_IDLE"><CODE>IdleStatus.BOTH_IDLE</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoService.html#isDisposed()">isDisposed</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <tt>true</tt> if and if only all resources of this processor have been disposed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoService.html#isDisposing()">isDisposing</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <tt>true</tt> if and if only <A HREF="../../../../org/apache/mina/common/IoService.html#dispose()"><CODE>dispose()</CODE></A> method has been called.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoService.html#isIdle(org.apache.mina.common.IdleStatus)">isIdle</A></B>(<A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common">IdleStatus</A>&nbsp;status)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if this service is idle for the specified <A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common"><CODE>IdleStatus</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoService.html#isReaderIdle()">isReaderIdle</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if this service is <A HREF="../../../../org/apache/mina/common/IdleStatus.html#READER_IDLE"><CODE>IdleStatus.READER_IDLE</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoService.html#isWriterIdle()">isWriterIdle</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if this service is <A HREF="../../../../org/apache/mina/common/IdleStatus.html#WRITER_IDLE"><CODE>IdleStatus.WRITER_IDLE</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoService.html#removeListener(org.apache.mina.common.IoServiceListener)">removeListener</A></B>(<A HREF="../../../../org/apache/mina/common/IoServiceListener.html" title="interface in org.apache.mina.common">IoServiceListener</A>&nbsp;listener)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removed an existing <A HREF="../../../../org/apache/mina/common/IoServiceListener.html" title="interface in org.apache.mina.common"><CODE>IoServiceListener</CODE></A> that listens any events related with this service.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoService.html#setBothIdleTime(int)">setBothIdleTime</A></B>(int&nbsp;idleTime)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets idle time for <A HREF="../../../../org/apache/mina/common/IdleStatus.html#WRITER_IDLE"><CODE>IdleStatus.WRITER_IDLE</CODE></A> in seconds.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoService.html#setFilterChainBuilder(org.apache.mina.common.IoFilterChainBuilder)">setFilterChainBuilder</A></B>(<A HREF="../../../../org/apache/mina/common/IoFilterChainBuilder.html" title="interface in org.apache.mina.common">IoFilterChainBuilder</A>&nbsp;builder)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the <A HREF="../../../../org/apache/mina/common/IoFilterChainBuilder.html" title="interface in org.apache.mina.common"><CODE>IoFilterChainBuilder</CODE></A> which will build the <A HREF="../../../../org/apache/mina/common/IoFilterChain.html" title="interface in org.apache.mina.common"><CODE>IoFilterChain</CODE></A> of all <A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common"><CODE>IoSession</CODE></A>s which is created by this service.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoService.html#setHandler(org.apache.mina.common.IoHandler)">setHandler</A></B>(<A HREF="../../../../org/apache/mina/common/IoHandler.html" title="interface in org.apache.mina.common">IoHandler</A>&nbsp;handler)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the handler which will handle all connections managed by this service.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoService.html#setIdleTime(org.apache.mina.common.IdleStatus, int)">setIdleTime</A></B>(<A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common">IdleStatus</A>&nbsp;status,            int&nbsp;idleTime)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets idle time for the specified type of idleness in seconds.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoService.html#setReaderIdleTime(int)">setReaderIdleTime</A></B>(int&nbsp;idleTime)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets idle time for <A HREF="../../../../org/apache/mina/common/IdleStatus.html#READER_IDLE"><CODE>IdleStatus.READER_IDLE</CODE></A> in seconds.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoService.html#setSessionDataStructureFactory(org.apache.mina.common.IoSessionDataStructureFactory)">setSessionDataStructureFactory</A></B>(<A HREF="../../../../org/apache/mina/common/IoSessionDataStructureFactory.html" title="interface in org.apache.mina.common">IoSessionDataStructureFactory</A>&nbsp;sessionDataStructureFactory)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the <A HREF="../../../../org/apache/mina/common/IoSessionDataStructureFactory.html" title="interface in org.apache.mina.common"><CODE>IoSessionDataStructureFactory</CODE></A> that provides related data structures for a new session created by this service.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoService.html#setThroughputCalculationInterval(int)">setThroughputCalculationInterval</A></B>(int&nbsp;throughputCalculationInterval)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the interval (seconds) between each throughput calculation.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoService.html#setWriterIdleTime(int)">setWriterIdleTime</A></B>(int&nbsp;idleTime)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets idle time for <A HREF="../../../../org/apache/mina/common/IdleStatus.html#WRITER_IDLE"><CODE>IdleStatus.WRITER_IDLE</CODE></A> in seconds.</TD></TR></TABLE>&nbsp;<P><!-- ============ 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="getTransportMetadata()"><!-- --></A><H3>getTransportMetadata</H3><PRE><A HREF="../../../../org/apache/mina/common/TransportMetadata.html" title="interface in org.apache.mina.common">TransportMetadata</A> <B>getTransportMetadata</B>()</PRE><DL><DD>Returns the <A HREF="../../../../org/apache/mina/common/TransportMetadata.html" title="interface in org.apache.mina.common"><CODE>TransportMetadata</CODE></A> that this service runs on.<P><DD><DL></DL></DD></DL><HR><A NAME="addListener(org.apache.mina.common.IoServiceListener)"><!-- --></A><H3>addListener</H3><PRE>void <B>addListener</B>(<A HREF="../../../../org/apache/mina/common/IoServiceListener.html" title="interface in org.apache.mina.common">IoServiceListener</A>&nbsp;listener)</PRE><DL><DD>Adds an <A HREF="../../../../org/apache/mina/common/IoServiceListener.html" title="interface in org.apache.mina.common"><CODE>IoServiceListener</CODE></A> that listens any events related with this service.<P><DD><DL></DL></DD></DL><HR><A NAME="removeListener(org.apache.mina.common.IoServiceListener)"><!-- --></A><H3>removeListener</H3><PRE>void <B>removeListener</B>(<A HREF="../../../../org/apache/mina/common/IoServiceListener.html" title="interface in org.apache.mina.common">IoServiceListener</A>&nbsp;listener)</PRE><DL><DD>Removed an existing <A HREF="../../../../org/apache/mina/common/IoServiceListener.html" title="interface in org.apache.mina.common"><CODE>IoServiceListener</CODE></A> that listens any events related with this service.<P><DD><DL></DL></DD></DL><HR><A NAME="isDisposing()"><!-- --></A><H3>isDisposing</H3><PRE>boolean <B>isDisposing</B>()</PRE><DL><DD>Returns <tt>true</tt> if and if only <A HREF="../../../../org/apache/mina/common/IoService.html#dispose()"><CODE>dispose()</CODE></A> method has been called.  Please note that this method will return <tt>true</tt> even after all the related resources are released.<P><DD><DL></DL></DD></DL><HR><A NAME="isDisposed()"><!-- --></A><H3>isDisposed</H3><PRE>boolean <B>isDisposed</B>()</PRE><DL><DD>Returns <tt>true</tt> if and if only all resources of this processor have been disposed.<P><DD><DL></DL></DD></DL><HR><A NAME="dispose()"><!-- --></A><H3>dispose</H3><PRE>void <B>dispose</B>()</PRE><DL><DD>Releases any resources allocated by this service.  Please note that  this method might block as long as there are any sessions managed by this service.<P><DD><DL></DL></DD></DL><HR><A NAME="getHandler()"><!-- --></A><H3>getHandler</H3><PRE><A HREF="../../../../org/apache/mina/common/IoHandler.html" title="interface in org.apache.mina.common">IoHandler</A> <B>getHandler</B>()</PRE><DL><DD>Returns the handler which will handle all connections managed by this service.<P><DD><DL></DL></DD></DL><HR><A NAME="setHandler(org.apache.mina.common.IoHandler)"><!-- --></A><H3>setHandler</H3><PRE>void <B>setHandler</B>(<A HREF="../../../../org/apache/mina/common/IoHandler.html" title="interface in org.apache.mina.common">IoHandler</A>&nbsp;handler)</PRE><DL><DD>Sets the handler which will handle all connections managed by this service.<P><DD><DL></DL></DD></DL><HR><A NAME="getManagedSessions()"><!-- --></A><H3>getManagedSessions</H3><PRE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">IoSession</A>&gt; <B>getManagedSessions</B>()</PRE><DL><DD>Returns all sessions which are currently managed by this service.<P>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -