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

📄 localsession.html

📁 开源软件openfire的API文件。进行openfire的二次开发所必需的工具。
💻 HTML
📖 第 1 页 / 共 4 页
字号:
</DD><DD><DL><DT><B>Parameters:</B><DD><CODE>address</CODE> - the new address of this session.</DL></DD></DL><HR><A NAME="getConnection()"><!-- --></A><H3>getConnection</H3><PRE>public <A HREF="../../../../org/jivesoftware/openfire/Connection.html" title="interface in org.jivesoftware.openfire">Connection</A> <B>getConnection</B>()</PRE><DL><DD>Returns the connection associated with this Session.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The connection for this session</DL></DD></DL><HR><A NAME="getStatus()"><!-- --></A><H3>getStatus</H3><PRE>public int <B>getStatus</B>()</PRE><DL><DD>Obtain the current status of this session.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/session/Session.html#getStatus()">getStatus</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 status code for this session</DL></DD></DL><HR><A NAME="setStatus(int)"><!-- --></A><H3>setStatus</H3><PRE>public void <B>setStatus</B>(int&nbsp;status)</PRE><DL><DD>Set the new status of this session. Setting a status may trigger certain events to occur (setting a closed status will close this session).<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>status</CODE> - The new status code for this session</DL></DD></DL><HR><A NAME="getStreamID()"><!-- --></A><H3>getStreamID</H3><PRE>public <A HREF="../../../../org/jivesoftware/openfire/StreamID.html" title="interface in org.jivesoftware.openfire">StreamID</A> <B>getStreamID</B>()</PRE><DL><DD>Obtain the stream ID associated with this sesison. Stream ID's are generated by the server and should be unique and random.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/session/Session.html#getStreamID()">getStreamID</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>This session's assigned stream ID</DL></DD></DL><HR><A NAME="getServerName()"><!-- --></A><H3>getServerName</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>getServerName</B>()</PRE><DL><DD>Obtain the name of the server this session belongs to.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/session/Session.html#getServerName()">getServerName</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 server name.</DL></DD></DL><HR><A NAME="getCreationDate()"><!-- --></A><H3>getCreationDate</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> <B>getCreationDate</B>()</PRE><DL><DD>Obtain the date the session was created.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/session/Session.html#getCreationDate()">getCreationDate</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 session's creation date.</DL></DD></DL><HR><A NAME="getLastActiveDate()"><!-- --></A><H3>getLastActiveDate</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> <B>getLastActiveDate</B>()</PRE><DL><DD>Obtain the time the session last had activity.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/session/Session.html#getLastActiveDate()">getLastActiveDate</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 last time the session received activity.</DL></DD></DL><HR><A NAME="incrementClientPacketCount()"><!-- --></A><H3>incrementClientPacketCount</H3><PRE>public void <B>incrementClientPacketCount</B>()</PRE><DL><DD>Increments the number of packets sent from the client to the server.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="incrementServerPacketCount()"><!-- --></A><H3>incrementServerPacketCount</H3><PRE>public void <B>incrementServerPacketCount</B>()</PRE><DL><DD>Increments the number of packets sent from the server to the client.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getNumClientPackets()"><!-- --></A><H3>getNumClientPackets</H3><PRE>public long <B>getNumClientPackets</B>()</PRE><DL><DD>Obtain the number of packets sent from the client to the server.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/session/Session.html#getNumClientPackets()">getNumClientPackets</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 number of packets sent from the client to the server.</DL></DD></DL><HR><A NAME="getNumServerPackets()"><!-- --></A><H3>getNumServerPackets</H3><PRE>public long <B>getNumServerPackets</B>()</PRE><DL><DD>Obtain the number of packets sent from the server to the client.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/session/Session.html#getNumServerPackets()">getNumServerPackets</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 number of packets sent from the server to the client.</DL></DD></DL><HR><A NAME="setSessionData(java.lang.String, java.lang.Object)"><!-- --></A><H3>setSessionData</H3><PRE>public void <B>setSessionData</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>&nbsp;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>&nbsp;value)</PRE><DL><DD>Saves given session data. Data are saved to temporary storage only and are accessible during this session life only and only from this session instance.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - a <code>String</code> value of stored data key ID.<DD><CODE>value</CODE> - a <code>Object</code> value of data stored in session.<DT><B>See Also:</B><DD><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#getSessionData(java.lang.String)"><CODE>getSessionData(String)</CODE></A></DL></DD></DL><HR><A NAME="getSessionData(java.lang.String)"><!-- --></A><H3>getSessionData</H3><PRE>public <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>getSessionData</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>&nbsp;key)</PRE><DL><DD>Retrieves session data. This method gives access to temporary session data only. You can retrieve earlier saved data giving key ID to receive needed value. Please see <A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#setSessionData(java.lang.String, java.lang.Object)"><CODE>setSessionData(String, Object)</CODE></A>  description for more details.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - a <code>String</code> value of stored data ID.<DT><B>Returns:</B><DD>a <code>Object</code> value of data for given key.<DT><B>See Also:</B><DD><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#setSessionData(java.lang.String, java.lang.Object)"><CODE>setSessionData(String, Object)</CODE></A></DL></DD></DL><HR><A NAME="removeSessionData(java.lang.String)"><!-- --></A><H3>removeSessionData</H3><PRE>public void <B>removeSessionData</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>&nbsp;key)</PRE><DL><DD>Removes session data. Please see <A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#setSessionData(java.lang.String, java.lang.Object)"><CODE>setSessionData(String, Object)</CODE></A> description for more details.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - a <code>String</code> value of stored data ID.<DT><B>See Also:</B><DD><A HREF="../../../../org/jivesoftware/openfire/session/LocalSession.html#setSessionData(java.lang.String, java.lang.Object)"><CODE>setSessionData(String, Object)</CODE></A></DL></DD></DL><HR><A NAME="process(org.xmpp.packet.Packet)"><!-- --></A><H3>process</H3><PRE>public void <B>process</B>(<A HREF="../../../../org/xmpp/packet/Packet.html" title="class in org.xmpp.packet">Packet</A>&nbsp;packet)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/ChannelHandler.html#process(T)">ChannelHandler</A></CODE></B></DD><DD>Process an XMPP packet.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/ChannelHandler.html#process(T)">process</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/ChannelHandler.html" title="interface in org.jivesoftware.openfire">ChannelHandler</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/session/Session.html#process(org.xmpp.packet.Packet)">process</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>Parameters:</B><DD><CODE>packet</CODE> - a packet to process.</DL></DD></DL><HR><A NAME="deliverRawText(java.lang.String)"><!-- --></A><H3>deliverRawText</H3><PRE>public void <B>deliverRawText</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>&nbsp;text)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/session/Session.html#deliverRawText(java.lang.String)">Session</A></CODE></B></DD><DD>Delivers raw text to this connection. This is a very low level way for sending XML stanzas to the client. This method should not be used unless you have very good reasons for not using <A HREF="../../../../org/jivesoftware/openfire/session/Session.html#process(org.xmpp.packet.Packet)"><CODE>Session.process(Packet)</CODE></A>.<p> This method avoids having to get the writer of this connection and mess directly with the writer. Therefore, this method ensures a correct delivery of the stanza even if other threads were sending data concurrently.

⌨️ 快捷键说明

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