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

📄 reconnectionmanager.html

📁 开源项目smack的API文件
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<A NAME="setSecondBetweenReconnection(int)"><!-- --></A><H3>setSecondBetweenReconnection</H3><PRE>protected void <B>setSecondBetweenReconnection</B>(int&nbsp;secondBetweenReconnection)</PRE><DL><DD>Sets the time elapsed between each reconnection attempt. It is used when the client has lost the server connection and the XMPPConnection automatically tries to reconnect.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>secondBetweenReconnection</CODE> - The number of seconds between reconnection.</DL></DD></DL><HR><A NAME="reconnect()"><!-- --></A><H3>reconnect</H3><PRE>protected void <B>reconnect</B>()</PRE><DL><DD>Starts a reconnection mechanism if it was configured to do that. The algorithm is been executed when the first connection error is detected. <p/> The reconnection mechanism will try to reconnect periodically in this way: <ol> <li>First it will try 6 times every 10 seconds. <li>Then it will try 10 times every 1 minute. <li>Finally it will try indefinitely every 5 minutes. </ol><P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="notifyReconnectionFailed(java.lang.Exception)"><!-- --></A><H3>notifyReconnectionFailed</H3><PRE>protected void <B>notifyReconnectionFailed</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A>&nbsp;exception)</PRE><DL><DD>Fires listeners when a reconnection attempt has failed.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>exception</CODE> - the exception that occured.</DL></DD></DL><HR><A NAME="notifyAttemptToReconnectIn(int)"><!-- --></A><H3>notifyAttemptToReconnectIn</H3><PRE>protected void <B>notifyAttemptToReconnectIn</B>(int&nbsp;seconds)</PRE><DL><DD>Fires listeners when The XMPPConnection will retry a reconnection. Expressed in seconds.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>seconds</CODE> - the number of seconds that a reconnection will be attempted in.</DL></DD></DL><HR><A NAME="connectionClosed()"><!-- --></A><H3>connectionClosed</H3><PRE>public void <B>connectionClosed</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../org/jivesoftware/smack/ConnectionListener.html#connectionClosed()">ConnectionListener</A></CODE></B></DD><DD>Notification that the connection was closed normally or that the reconnection process has been aborted.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/jivesoftware/smack/ConnectionListener.html#connectionClosed()">connectionClosed</A></CODE> in interface <CODE><A HREF="../../../org/jivesoftware/smack/ConnectionListener.html" title="interface in org.jivesoftware.smack">ConnectionListener</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="connectionClosedOnError(java.lang.Exception)"><!-- --></A><H3>connectionClosedOnError</H3><PRE>public void <B>connectionClosedOnError</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A>&nbsp;e)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../org/jivesoftware/smack/ConnectionListener.html#connectionClosedOnError(java.lang.Exception)">ConnectionListener</A></CODE></B></DD><DD>Notification that the connection was closed due to an exception. When abruptly disconnected it is possible for the connection to try reconnecting to the server.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/jivesoftware/smack/ConnectionListener.html#connectionClosedOnError(java.lang.Exception)">connectionClosedOnError</A></CODE> in interface <CODE><A HREF="../../../org/jivesoftware/smack/ConnectionListener.html" title="interface in org.jivesoftware.smack">ConnectionListener</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>e</CODE> - the exception.</DL></DD></DL><HR><A NAME="reconnectingIn(int)"><!-- --></A><H3>reconnectingIn</H3><PRE>public void <B>reconnectingIn</B>(int&nbsp;seconds)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../org/jivesoftware/smack/ConnectionListener.html#reconnectingIn(int)">ConnectionListener</A></CODE></B></DD><DD>The connection will retry to reconnect in the specified number of seconds.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/jivesoftware/smack/ConnectionListener.html#reconnectingIn(int)">reconnectingIn</A></CODE> in interface <CODE><A HREF="../../../org/jivesoftware/smack/ConnectionListener.html" title="interface in org.jivesoftware.smack">ConnectionListener</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>seconds</CODE> - remaining seconds before attempting a reconnection.</DL></DD></DL><HR><A NAME="reconnectionFailed(java.lang.Exception)"><!-- --></A><H3>reconnectionFailed</H3><PRE>public void <B>reconnectionFailed</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A>&nbsp;e)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../org/jivesoftware/smack/ConnectionListener.html#reconnectionFailed(java.lang.Exception)">ConnectionListener</A></CODE></B></DD><DD>An attempt to connect to the server has failed. The connection will keep trying reconnecting to the server in a moment.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/jivesoftware/smack/ConnectionListener.html#reconnectionFailed(java.lang.Exception)">reconnectionFailed</A></CODE> in interface <CODE><A HREF="../../../org/jivesoftware/smack/ConnectionListener.html" title="interface in org.jivesoftware.smack">ConnectionListener</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>e</CODE> - the exception that caused the reconnection to fail.</DL></DD></DL><HR><A NAME="reconnectionSuccessful()"><!-- --></A><H3>reconnectionSuccessful</H3><PRE>public void <B>reconnectionSuccessful</B>()</PRE><DL><DD>The connection has successfull gotten connected.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/jivesoftware/smack/ConnectionListener.html#reconnectionSuccessful()">reconnectionSuccessful</A></CODE> in interface <CODE><A HREF="../../../org/jivesoftware/smack/ConnectionListener.html" title="interface in org.jivesoftware.smack">ConnectionListener</A></CODE></DL></DD><DD><DL></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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Smack</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../org/jivesoftware/smack/PrivacyListManager.html" title="class in org.jivesoftware.smack"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../org/jivesoftware/smack/Roster.html" title="class in org.jivesoftware.smack"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?org/jivesoftware/smack/ReconnectionManager.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="ReconnectionManager.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright &copy; 2003-2007 Jive Software. </i></BODY></HTML>

⌨️ 快捷键说明

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