📄 ioacceptor.html
字号:
<HR><A NAME="bind(java.lang.Iterable)"><!-- --></A><H3>bind</H3><PRE>void <B>bind</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><? extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</A>> localAddresses) throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE><DL><DD>Binds to the specified local addresses and start to accept incoming connections.<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - if failed to bind</DL></DD></DL><HR><A NAME="unbind()"><!-- --></A><H3>unbind</H3><PRE>void <B>unbind</B>()</PRE><DL><DD>Unbinds from all local addresses that this service is bound to and stops to accept incoming connections. All managed connections will be closed if <A HREF="../../../../org/apache/mina/common/IoAcceptor.html#setCloseOnDeactivation(boolean)"><CODE>disconnectOnUnbind</CODE></A> property is <tt>true</tt>. This method returns silently if no local address is bound yet.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="unbind(java.net.SocketAddress)"><!-- --></A><H3>unbind</H3><PRE>void <B>unbind</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</A> localAddress)</PRE><DL><DD>Unbinds from the specified local address and stop to accept incoming connections. All managed connections will be closed if <A HREF="../../../../org/apache/mina/common/IoAcceptor.html#setCloseOnDeactivation(boolean)"><CODE>disconnectOnUnbind</CODE></A> property is <tt>true</tt>. This method returns silently if the default local address is not bound yet.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="unbind(java.net.SocketAddress, java.net.SocketAddress...)"><!-- --></A><H3>unbind</H3><PRE>void <B>unbind</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</A> firstLocalAddress, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</A>... otherLocalAddresses)</PRE><DL><DD>Unbinds from the specified local addresses and stop to accept incoming connections. All managed connections will be closed if <A HREF="../../../../org/apache/mina/common/IoAcceptor.html#setCloseOnDeactivation(boolean)"><CODE>disconnectOnUnbind</CODE></A> property is <tt>true</tt>. This method returns silently if the default local addresses are not bound yet.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="unbind(java.lang.Iterable)"><!-- --></A><H3>unbind</H3><PRE>void <B>unbind</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><? extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</A>> localAddresses)</PRE><DL><DD>Unbinds from the specified local addresses and stop to accept incoming connections. All managed connections will be closed if <A HREF="../../../../org/apache/mina/common/IoAcceptor.html#setCloseOnDeactivation(boolean)"><CODE>disconnectOnUnbind</CODE></A> property is <tt>true</tt>. This method returns silently if the default local addresses are not bound yet.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="newSession(java.net.SocketAddress, java.net.SocketAddress)"><!-- --></A><H3>newSession</H3><PRE><A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">IoSession</A> <B>newSession</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</A> remoteAddress, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</A> localAddress)</PRE><DL><DD>(Optional) Returns an <A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common"><CODE>IoSession</CODE></A> that is bound to the specified <tt>localAddress</tt> and the specified <tt>remoteAddress</tt> which reuses the local address that is already bound by this service. <p> This operation is optional. Please throw <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang"><CODE>UnsupportedOperationException</CODE></A> if the transport type doesn't support this operation. This operation is usually implemented for connectionless transport types.<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if this operation is not supported<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this service is not running.<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if this service is not bound to the specified <tt>localAddress</tt>.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/IoAcceptor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../org/apache/mina/common/IdleStatusChecker.html" title="class in org.apache.mina.common"><B>PREV CLASS</B></A> <A HREF="../../../../org/apache/mina/common/IoBuffer.html" title="class in org.apache.mina.common"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/apache/mina/common/IoAcceptor.html" target="_top"><B>FRAMES</B></A> <A HREF="IoAcceptor.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright 漏 2004-2008 <a href="http://mina.apache.org/">Apache MINA Project</a>. All Rights Reserved.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -