📄 httpsessionmanager.html
字号:
<B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="start()"><!-- --></A><H3>start</H3><PRE>public void <B>start</B>()</PRE><DL><DD>Starts the services used by the HttpSessionManager.<P><DD><DL></DL></DD></DL><HR><A NAME="stop()"><!-- --></A><H3>stop</H3><PRE>public void <B>stop</B>()</PRE><DL><DD>Stops any services and cleans up any resources used by the HttpSessionManager.<P><DD><DL></DL></DD></DL><HR><A NAME="getSession(java.lang.String)"><!-- --></A><H3>getSession</H3><PRE>public <A HREF="../../../../org/jivesoftware/openfire/http/HttpSession.html" title="class in org.jivesoftware.openfire.http">HttpSession</A> <B>getSession</B>(<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> streamID)</PRE><DL><DD>Returns the session related to a stream id.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>streamID</CODE> - the stream id to retrieve the session.<DT><B>Returns:</B><DD>the session related to the provided stream id.</DL></DD></DL><HR><A NAME="createSession(java.net.InetAddress, org.dom4j.Element, org.jivesoftware.openfire.http.HttpConnection)"><!-- --></A><H3>createSession</H3><PRE>public <A HREF="../../../../org/jivesoftware/openfire/http/HttpSession.html" title="class in org.jivesoftware.openfire.http">HttpSession</A> <B>createSession</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/InetAddress.html" title="class or interface in java.net">InetAddress</A> address, org.dom4j.Element rootNode, <A HREF="../../../../org/jivesoftware/openfire/http/HttpConnection.html" title="class in org.jivesoftware.openfire.http">HttpConnection</A> connection) throws <A HREF="../../../../org/jivesoftware/openfire/auth/UnauthorizedException.html" title="class in org.jivesoftware.openfire.auth">UnauthorizedException</A>, <A HREF="../../../../org/jivesoftware/openfire/http/HttpBindException.html" title="class in org.jivesoftware.openfire.http">HttpBindException</A></PRE><DL><DD>Creates an HTTP binding session which will allow a user to exchange packets with Openfire.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>address</CODE> - the internet address that was used to bind to Wildfie.<DD><CODE>rootNode</CODE> - the body element that was sent containing the request for a new session.<DD><CODE>connection</CODE> - the HTTP connection object which abstracts the individual connections to Openfire over the HTTP binding protocol. The initial session creation response is returned to this connection.<DT><B>Returns:</B><DD>the created HTTP session.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/auth/UnauthorizedException.html" title="class in org.jivesoftware.openfire.auth">UnauthorizedException</A></CODE> - if the Openfire server is currently in an uninitialized state. Either shutting down or starting up.<DD><CODE><A HREF="../../../../org/jivesoftware/openfire/http/HttpBindException.html" title="class in org.jivesoftware.openfire.http">HttpBindException</A></CODE> - when there is an internal server error related to the creation of the initial session creation response.</DL></DD></DL><HR><A NAME="getMaxPause()"><!-- --></A><H3>getMaxPause</H3><PRE>public int <B>getMaxPause</B>()</PRE><DL><DD>Returns the maximum length of a temporary session pause (in seconds) that the client MAY request.<P><DD><DL><DT><B>Returns:</B><DD>the maximum length of a temporary session pause (in seconds) that the client MAY request.</DL></DD></DL><HR><A NAME="getMaxWait()"><!-- --></A><H3>getMaxWait</H3><PRE>public int <B>getMaxWait</B>()</PRE><DL><DD>Returns the longest time (in seconds) that Openfire is allowed to wait before responding to any request during the session. This enables the client to prevent its TCP connection from expiring due to inactivity, as well as to limit the delay before it discovers any network failure.<P><DD><DL><DT><B>Returns:</B><DD>the longest time (in seconds) that Openfire is allowed to wait before responding to any request during the session.</DL></DD></DL><HR><A NAME="getPollingInterval()"><!-- --></A><H3>getPollingInterval</H3><PRE>public int <B>getPollingInterval</B>()</PRE><DL><DD>Openfire SHOULD include two additional attributes in the session creation response element, specifying the shortest allowable polling interval and the longest allowable inactivity period (both in seconds). Communication of these parameters enables the client to engage in appropriate behavior (e.g., not sending empty request elements more often than desired, and ensuring that the periods with no requests pending are never too long).<P><DD><DL><DT><B>Returns:</B><DD>the maximum allowable period over which a client can send empty requests to the server.</DL></DD></DL><HR><A NAME="getMaxRequests()"><!-- --></A><H3>getMaxRequests</H3><PRE>public int <B>getMaxRequests</B>()</PRE><DL><DD>Openfire MAY limit the number of simultaneous requests the client makes with the 'requests' attribute. The RECOMMENDED value is "2". Servers that only support polling behavior MUST prevent clients from making simultaneous requests by setting the 'requests' attribute to a value of "1" (however, polling is NOT RECOMMENDED). In any case, clients MUST NOT make more simultaneous requests than specified by the Openfire.<P><DD><DL><DT><B>Returns:</B><DD>the number of simultaneous requests allowable.</DL></DD></DL><HR><A NAME="getInactivityTimeout()"><!-- --></A><H3>getInactivityTimeout</H3><PRE>public int <B>getInactivityTimeout</B>()</PRE><DL><DD>Seconds a session has to be idle to be closed. Default is 30. Sending stanzas to the client is not considered as activity. We are only considering the connection active when the client sends some data or hearbeats (i.e. whitespaces) to the server. The reason for this is that sending data will fail if the connection is closed. And if the thread is blocked while sending data (because the socket is closed) then the clean up thread will close the socket anyway.<P><DD><DL><DT><B>Returns:</B><DD>Seconds a session has to be idle to be closed.</DL></DD></DL><HR><A NAME="getPollingInactivityTimeout()"><!-- --></A><H3>getPollingInactivityTimeout</H3><PRE>public int <B>getPollingInactivityTimeout</B>()</PRE><DL><DD>Seconds a polling session has to be idle to be closed. Default is 60. Sending stanzas to the client is not considered as activity. We are only considering the connection active when the client sends some data or hearbeats (i.e. whitespaces) to the server. The reason for this is that sending data will fail if the connection is closed. And if the thread is blocked while sending data (because the socket is closed) then the clean up thread will close the socket anyway.<P><DD><DL><DT><B>Returns:</B><DD>Seconds a polling session has to be idle to be closed.</DL></DD></DL><HR><A NAME="forwardRequest(long, org.jivesoftware.openfire.http.HttpSession, boolean, org.dom4j.Element)"><!-- --></A><H3>forwardRequest</H3><PRE>public <A HREF="../../../../org/jivesoftware/openfire/http/HttpConnection.html" title="class in org.jivesoftware.openfire.http">HttpConnection</A> <B>forwardRequest</B>(long rid, <A HREF="../../../../org/jivesoftware/openfire/http/HttpSession.html" title="class in org.jivesoftware.openfire.http">HttpSession</A> session, boolean isSecure, org.dom4j.Element rootNode) throws <A HREF="../../../../org/jivesoftware/openfire/http/HttpBindException.html" title="class in org.jivesoftware.openfire.http">HttpBindException</A>, <A HREF="../../../../org/jivesoftware/openfire/http/HttpConnectionClosedException.html" title="class in org.jivesoftware.openfire.http">HttpConnectionClosedException</A></PRE><DL><DD>Forwards a client request, which is related to a session, to the server. A connection is created and queued up in the provided session. When a connection reaches the top of a queue any pending packets bound for the client will be forwarded to the client through the connection.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>rid</CODE> - the unique, sequential, requestID sent from the client.<DD><CODE>session</CODE> - the HTTP session of the client that made the request.<DD><CODE>isSecure</CODE> - true if the request was made over a secure channel, HTTPS, and false if it was not.<DD><CODE>rootNode</CODE> - the XML body of the request.<DT><B>Returns:</B><DD>the created HTTP connection.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/http/HttpBindException.html" title="class in org.jivesoftware.openfire.http">HttpBindException</A></CODE> - for several reasons: if the encoding inside of an auth packet is not recognized by the server, or if the packet type is not recognized.<DD><CODE><A HREF="../../../../org/jivesoftware/openfire/http/HttpConnectionClosedException.html" title="class in org.jivesoftware.openfire.http">HttpConnectionClosedException</A></CODE> - if the session is no longer available.</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/HttpSession.HttpVirtualConnection.html" title="class in org.jivesoftware.openfire.http"><B>PREV CLASS</B></A> <A HREF="../../../../org/jivesoftware/openfire/http/ResourceServlet.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/HttpSessionManager.html" target="_top"><B>FRAMES</B></A> <A HREF="HttpSessionManager.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 | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright © 2003-2008 Jive Software.</i></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -