📄 localsession.html
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#getNumClientPackets()">getNumClientPackets</A></B>()</CODE><BR> Obtain the number of packets sent from the client to the server.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#getNumServerPackets()">getNumServerPackets</A></B>()</CODE><BR> Obtain the number of packets sent from the server to the client.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <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></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#getServerName()">getServerName</A></B>()</CODE><BR> Obtain the name of the server this session belongs to.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#getSessionData(java.lang.String)">getSessionData</A></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> key)</CODE><BR> Retrieves session data.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#getStatus()">getStatus</A></B>()</CODE><BR> Obtain the current status of this session.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/jivesoftware/openfire/StreamID.html" title="interface in org.jivesoftware.openfire">StreamID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#getStreamID()">getStreamID</A></B>()</CODE><BR> Obtain the stream ID associated with this sesison.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#incrementClientPacketCount()">incrementClientPacketCount</A></B>()</CODE><BR> Increments the number of packets sent from the client to the server.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#incrementServerPacketCount()">incrementServerPacketCount</A></B>()</CODE><BR> Increments the number of packets sent from the server to the client.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#isClosed()">isClosed</A></B>()</CODE><BR> Returns true if the connection/session is closed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#isSecure()">isSecure</A></B>()</CODE><BR> Returns true if this connection is secure.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#isUsingSelfSignedCertificate()">isUsingSelfSignedCertificate</A></B>()</CODE><BR> Returns true if the other peer of this session presented a self-signed certificate.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#process(org.xmpp.packet.Packet)">process</A></B>(<A HREF="../../../../org/xmpp/packet/Packet.html" title="class in org.xmpp.packet">Packet</A> packet)</CODE><BR> Process an XMPP packet.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#removeSessionData(java.lang.String)">removeSessionData</A></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> key)</CODE><BR> Removes session data.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#setAddress(org.xmpp.packet.JID)">setAddress</A></B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> address)</CODE><BR> Sets the new address of this session.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#setSessionData(java.lang.String, java.lang.Object)">setSessionData</A></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> key, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> value)</CODE><BR> Saves given session data.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#setStatus(int)">setStatus</A></B>(int status)</CODE><BR> Set the new status of this session.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <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></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#toString()">toString</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#validate()">validate</A></B>()</CODE><BR> Verifies that the connection is still live.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="CHARSET"><!-- --></A><H3>CHARSET</H3><PRE>protected static <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>CHARSET</B></PRE><DL><DD>The utf-8 charset for decoding and encoding Jabber packet streams.<P><DL></DL></DL><HR><A NAME="status"><!-- --></A><H3>status</H3><PRE>protected int <B>status</B></PRE><DL><DD>The current session status.<P><DL></DL></DL><HR><A NAME="conn"><!-- --></A><H3>conn</H3><PRE>protected <A HREF="../../../../org/jivesoftware/openfire/Connection.html" title="interface in org.jivesoftware.openfire">Connection</A> <B>conn</B></PRE><DL><DD>The connection that this session represents.<P><DL></DL></DL><HR><A NAME="sessionManager"><!-- --></A><H3>sessionManager</H3><PRE>protected <A HREF="../../../../org/jivesoftware/openfire/SessionManager.html" title="class in org.jivesoftware.openfire">SessionManager</A> <B>sessionManager</B></PRE><DL><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="LocalSession(java.lang.String, org.jivesoftware.openfire.Connection, org.jivesoftware.openfire.StreamID)"><!-- --></A><H3>LocalSession</H3><PRE>public <B>LocalSession</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> serverName, <A HREF="../../../../org/jivesoftware/openfire/Connection.html" title="interface in org.jivesoftware.openfire">Connection</A> connection, <A HREF="../../../../org/jivesoftware/openfire/StreamID.html" title="interface in org.jivesoftware.openfire">StreamID</A> streamID)</PRE><DL><DD>Creates a session with an underlying connection and permission protection.<P><DL><DT><B>Parameters:</B><DD><CODE>serverName</CODE> - domain of the XMPP server where the new session belongs.<DD><CODE>connection</CODE> - The connection we are proxying.<DD><CODE>streamID</CODE> - unique identifier for this session.</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getAddress()"><!-- --></A><H3>getAddress</H3><PRE>public <A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> <B>getAddress</B>()</PRE><DL><DD>Obtain the address of the user. The address is used by services like the core server packet router to determine if a packet should be sent to the handler. Handlers that are working on behalf of the server should use the generic server hostname address (e.g. server.com).<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/RoutableChannelHandler.html#getAddress()">getAddress</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/RoutableChannelHandler.html" title="interface in org.jivesoftware.openfire">RoutableChannelHandler</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/session/Session.html#getAddress()">getAddress</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/session/Session.html" title="interface in org.jivesoftware.openfire.session">Session</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the address of the packet handler.</DL></DD></DL><HR><A NAME="setAddress(org.xmpp.packet.JID)"><!-- --></A><H3>setAddress</H3><PRE>public void <B>setAddress</B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> address)</PRE><DL><DD>Sets the new address of this session. The address is used by services like the core server packet router to determine if a packet should be sent to the handler. Handlers that are working on behalf of the server should use the generic server hostname address (e.g. server.com).<P><DD><DL></DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -