📄 httpsession.html
字号:
<A NAME="pause(int)"><!-- --></A><H3>pause</H3><PRE>public void <B>pause</B>(int duration)</PRE><DL><DD>Pauses the session for the given amount of time. If a client encounters an exceptional temporary situation during which it will be unable to send requests to the connection manager for a period of time greater than the maximum inactivity period, then the client MAY request a temporary increase to the maximum inactivity period by including a 'pause' attribute in a request.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>duration</CODE> - the time, in seconds, after which this session will be considered inactive and terminated.</DL></DD></DL><HR><A NAME="getLastActivity()"><!-- --></A><H3>getLastActivity</H3><PRE>public long <B>getLastActivity</B>()</PRE><DL><DD>Returns the time in milliseconds since the epoch that this session was last active. Activity is a request was either made or responded to. If the session is currently active, meaning there are connections awaiting a response, the current time is returned.<P><DD><DL><DT><B>Returns:</B><DD>the time in milliseconds since the epoch that this session was last active.</DL></DD></DL><HR><A NAME="getLastAcknowledged()"><!-- --></A><H3>getLastAcknowledged</H3><PRE>public long <B>getLastAcknowledged</B>()</PRE><DL><DD>Returns the highest 'rid' attribute the server has received where it has also received all requests with lower 'rid' values. When responding to a request that it has been holding, if the server finds it has already received another request with a higher 'rid' attribute (typically while it was holding the first request), then it MAY acknowledge the reception to the client.<P><DD><DL><DT><B>Returns:</B><DD>the highest 'rid' attribute the server has received where it has also received all requests with lower 'rid' values.</DL></DD></DL><HR><A NAME="setMajorVersion(int)"><!-- --></A><H3>setMajorVersion</H3><PRE>public void <B>setMajorVersion</B>(int majorVersion)</PRE><DL><DD>Sets the major version of BOSH which the client implements. Currently, the only versions supported by Openfire are 1.5 and 1.6.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>majorVersion</CODE> - the major version of BOSH which the client implements.</DL></DD></DL><HR><A NAME="getMajorVersion()"><!-- --></A><H3>getMajorVersion</H3><PRE>public int <B>getMajorVersion</B>()</PRE><DL><DD>Returns the major version of BOSH which this session utilizes. The version refers to the version of the XEP which the connecting client implements. If the client did not specify a version 1 is returned as 1.5 is the last version of the <a href="http://www.xmpp.org/extensions/xep-0124.html">XEP</a> that the client was not required to pass along its version information when creating a session.<P><DD><DL><DT><B>Returns:</B><DD>the major version of the BOSH XEP which the client is utilizing.</DL></DD></DL><HR><A NAME="setMinorVersion(int)"><!-- --></A><H3>setMinorVersion</H3><PRE>public void <B>setMinorVersion</B>(int minorVersion)</PRE><DL><DD>Sets the minor version of BOSH which the client implements. Currently, the only versions supported by Openfire are 1.5 and 1.6. Any versions less than or equal to 5 will be interpreted as 5 and any values greater than or equal to 6 will be interpreted as 6.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>minorVersion</CODE> - the minor version of BOSH which the client implements.</DL></DD></DL><HR><A NAME="getMinorVersion()"><!-- --></A><H3>getMinorVersion</H3><PRE>public int <B>getMinorVersion</B>()</PRE><DL><DD>Returns the major version of BOSH which this session utilizes. The version refers to the version of the XEP which the connecting client implements. If the client did not specify a version 5 is returned as 1.5 is the last version of the <a href="http://www.xmpp.org/extensions/xep-0124.html">XEP</a> that the client was not required to pass along its version information when creating a session.<P><DD><DL><DT><B>Returns:</B><DD>the minor version of the BOSH XEP which the client is utilizing.</DL></DD></DL><HR><A NAME="setLastResponseEmpty(boolean)"><!-- --></A><H3>setLastResponseEmpty</H3><PRE>public void <B>setLastResponseEmpty</B>(boolean lastResponseEmpty)</PRE><DL><DD>lastResponseEmpty true if last response of this session is an empty body element. This is used in overactivity checking.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>lastResponseEmpty</CODE> - true if last response of this session is an empty body element.</DL></DD></DL><HR><A NAME="getResponse(long)"><!-- --></A><H3>getResponse</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getResponse</B>(long requestID) throws <A HREF="../../../../org/jivesoftware/openfire/http/HttpBindException.html" title="class in org.jivesoftware.openfire.http">HttpBindException</A></PRE><DL><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/http/HttpBindException.html" title="class in org.jivesoftware.openfire.http">HttpBindException</A></CODE></DL></DD></DL><HR><A NAME="setSecure(boolean)"><!-- --></A><H3>setSecure</H3><PRE>protected void <B>setSecure</B>(boolean isSecure)</PRE><DL><DD>Sets whether the initial request on the session was secure.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>isSecure</CODE> - true if the initial request was secure and false if it wasn't.</DL></DD></DL><HR><A NAME="sendPendingPackets()"><!-- --></A><H3>sendPendingPackets</H3><PRE>protected void <B>sendPendingPackets</B>()</PRE><DL><DD>This methods sends any pending packets in the session. If no packets are pending, this method simply returns. The method is internally synchronized to avoid simultanious sending operations on this Session. If two threads try to run this method simultaniously, the first one will trigger the pending packets to be sent, while the second one will simply return (as there are no packets left to send).<P><DD><DL></DL></DD></DL><HR><A NAME="getPeerCertificates()"><!-- --></A><H3>getPeerCertificates</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/security/cert/X509Certificate.html" title="class or interface in java.security.cert">X509Certificate</A>[] <B>getPeerCertificates</B>()</PRE><DL><DD>Return the X509Certificates associated with this session.<P><DD><DL><DT><B>Returns:</B><DD>the X509Certificate associated with this session.</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="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><b>Openfire 3.6.0a Javadoc</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../org/jivesoftware/openfire/http/HttpConnectionClosedException.html" title="class in org.jivesoftware.openfire.http"><B>PREV CLASS</B></A> <A HREF="../../../../org/jivesoftware/openfire/http/HttpSession.HttpVirtualConnection.html" title="class in org.jivesoftware.openfire.http"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/jivesoftware/openfire/http/HttpSession.html" target="_top"><B>FRAMES</B></A> <A HREF="HttpSession.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><
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -