📄 ioconnector.html
字号:
</DD><DD><DL><DT><B>Throws:</B><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 no default remoted address is set.</DL></DD></DL><HR><A NAME="connect(org.apache.mina.common.IoSessionInitializer)"><!-- --></A><H3>connect</H3><PRE><A HREF="../../../../org/apache/mina/common/ConnectFuture.html" title="interface in org.apache.mina.common">ConnectFuture</A> <B>connect</B>(<A HREF="../../../../org/apache/mina/common/IoSessionInitializer.html" title="interface in org.apache.mina.common">IoSessionInitializer</A><? extends <A HREF="../../../../org/apache/mina/common/ConnectFuture.html" title="interface in org.apache.mina.common">ConnectFuture</A>> sessionInitializer)</PRE><DL><DD>Connects to the <A HREF="../../../../org/apache/mina/common/IoConnector.html#setDefaultRemoteAddress(java.net.SocketAddress)"><CODE>default remote address</CODE></A> and invokes the <code>ioSessionInitializer</code> when the IoSession is created but before <A HREF="../../../../org/apache/mina/common/IoHandler.html#sessionCreated(org.apache.mina.common.IoSession)"><CODE>IoHandler.sessionCreated(IoSession)</CODE></A> is invoked. There is <em>no</em> guarantee that the <code>ioSessionInitializer</code> will be invoked before this method returns.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>sessionInitializer</CODE> - the callback to invoke when the <A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common"><CODE>IoSession</CODE></A> object is created<DT><B>Throws:</B><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 no default remote address is set.</DL></DD></DL><HR><A NAME="connect(java.net.SocketAddress)"><!-- --></A><H3>connect</H3><PRE><A HREF="../../../../org/apache/mina/common/ConnectFuture.html" title="interface in org.apache.mina.common">ConnectFuture</A> <B>connect</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)</PRE><DL><DD>Connects to the specified remote address.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the <A HREF="../../../../org/apache/mina/common/ConnectFuture.html" title="interface in org.apache.mina.common"><CODE>ConnectFuture</CODE></A> instance which is completed when the connection attempt initiated by this call succeeds or fails.</DL></DD></DL><HR><A NAME="connect(java.net.SocketAddress, org.apache.mina.common.IoSessionInitializer)"><!-- --></A><H3>connect</H3><PRE><A HREF="../../../../org/apache/mina/common/ConnectFuture.html" title="interface in org.apache.mina.common">ConnectFuture</A> <B>connect</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="../../../../org/apache/mina/common/IoSessionInitializer.html" title="interface in org.apache.mina.common">IoSessionInitializer</A><? extends <A HREF="../../../../org/apache/mina/common/ConnectFuture.html" title="interface in org.apache.mina.common">ConnectFuture</A>> sessionInitializer)</PRE><DL><DD>Connects to the specified remote address and invokes the <code>ioSessionInitializer</code> when the IoSession is created but before <A HREF="../../../../org/apache/mina/common/IoHandler.html#sessionCreated(org.apache.mina.common.IoSession)"><CODE>IoHandler.sessionCreated(IoSession)</CODE></A> is invoked. There is <em>no</em> guarantee that the <code>ioSessionInitializer</code> will be invoked before this method returns.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>remoteAddress</CODE> - the remote address to connect to<DD><CODE>sessionInitializer</CODE> - the callback to invoke when the <A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common"><CODE>IoSession</CODE></A> object is created<DT><B>Returns:</B><DD>the <A HREF="../../../../org/apache/mina/common/ConnectFuture.html" title="interface in org.apache.mina.common"><CODE>ConnectFuture</CODE></A> instance which is completed when the connection attempt initiated by this call succeeds or fails.</DL></DD></DL><HR><A NAME="connect(java.net.SocketAddress, java.net.SocketAddress)"><!-- --></A><H3>connect</H3><PRE><A HREF="../../../../org/apache/mina/common/ConnectFuture.html" title="interface in org.apache.mina.common">ConnectFuture</A> <B>connect</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>Connects to the specified remote address binding to the specified local address.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the <A HREF="../../../../org/apache/mina/common/ConnectFuture.html" title="interface in org.apache.mina.common"><CODE>ConnectFuture</CODE></A> instance which is completed when the connection attempt initiated by this call succeeds or fails.</DL></DD></DL><HR><A NAME="connect(java.net.SocketAddress, java.net.SocketAddress, org.apache.mina.common.IoSessionInitializer)"><!-- --></A><H3>connect</H3><PRE><A HREF="../../../../org/apache/mina/common/ConnectFuture.html" title="interface in org.apache.mina.common">ConnectFuture</A> <B>connect</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, <A HREF="../../../../org/apache/mina/common/IoSessionInitializer.html" title="interface in org.apache.mina.common">IoSessionInitializer</A><? extends <A HREF="../../../../org/apache/mina/common/ConnectFuture.html" title="interface in org.apache.mina.common">ConnectFuture</A>> sessionInitializer)</PRE><DL><DD>Connects to the specified remote address binding to the specified local address and and invokes the <code>ioSessionInitializer</code> when the IoSession is created but before <A HREF="../../../../org/apache/mina/common/IoHandler.html#sessionCreated(org.apache.mina.common.IoSession)"><CODE>IoHandler.sessionCreated(IoSession)</CODE></A> is invoked. There is <em>no</em> guarantee that the <code>ioSessionInitializer</code> will be invoked before this method returns.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>remoteAddress</CODE> - the remote address to connect to<DD><CODE>localAddress</CODE> - the local interface to bind to<DD><CODE>sessionInitializer</CODE> - the callback to invoke when the <A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common"><CODE>IoSession</CODE></A> object is created<DT><B>Returns:</B><DD>the <A HREF="../../../../org/apache/mina/common/ConnectFuture.html" title="interface in org.apache.mina.common"><CODE>ConnectFuture</CODE></A> instance which is completed when the connection attempt initiated by this call succeeds or fails.</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/IoConnector.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/IoBufferWrapper.html" title="class in org.apache.mina.common"><B>PREV CLASS</B></A> <A HREF="../../../../org/apache/mina/common/IoEvent.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/IoConnector.html" target="_top"><B>FRAMES</B></A> <A HREF="IoConnector.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 + -