📄 session.html
字号:
<A NAME="getNumServerPackets()"><!-- --></A><H3>getNumServerPackets</H3><PRE>long <B>getNumServerPackets</B>()</PRE><DL><DD>Obtain the number of packets sent from the server to the client.<P><DD><DL></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="close()"><!-- --></A><H3>close</H3><PRE>void <B>close</B>()</PRE><DL><DD>Close this session including associated socket connection. The order of events for closing the session is: <ul> <li>Set closing flag to prevent redundant shutdowns. <li>Call notifyEvent all listeners that the channel is shutting down. <li>Close the socket. </ul><P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="isClosed()"><!-- --></A><H3>isClosed</H3><PRE>boolean <B>isClosed</B>()</PRE><DL><DD>Returns true if the connection/session is closed.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the connection is closed.</DL></DD></DL><HR><A NAME="isSecure()"><!-- --></A><H3>isSecure</H3><PRE>boolean <B>isSecure</B>()</PRE><DL><DD>Returns true if this connection is secure.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the connection is secure (e.g. SSL/TLS)</DL></DD></DL><HR><A NAME="getHostAddress()"><!-- --></A><H3>getHostAddress</H3><PRE><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>getHostAddress</B>() throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/UnknownHostException.html" title="class or interface in java.net">UnknownHostException</A></PRE><DL><DD>Returns the IP address string in textual presentation.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the raw IP address in a string format.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/UnknownHostException.html" title="class or interface in java.net">UnknownHostException</A></CODE> - if IP address of host could not be determined.</DL></DD></DL><HR><A NAME="getHostName()"><!-- --></A><H3>getHostName</H3><PRE><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>getHostName</B>() throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/UnknownHostException.html" title="class or interface in java.net">UnknownHostException</A></PRE><DL><DD>Gets the host name for this IP address. <p>If this InetAddress was created with a host name, this host name will be remembered and returned; otherwise, a reverse name lookup will be performed and the result will be returned based on the system configured name lookup service. If a lookup of the name service is required, call <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/InetAddress.html#getCanonicalHostName()" title="class or interface in java.net"><CODE>getCanonicalHostName</CODE></A>. <p>If there is a security manager, its <code>checkConnect</code> method is first called with the hostname and <code>-1</code> as its arguments to see if the operation is allowed. If the operation is not allowed, it will return the textual representation of the IP address.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the host name for this IP address, or if the operation is not allowed by the security check, the textual representation of the IP address.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/UnknownHostException.html" title="class or interface in java.net">UnknownHostException</A></CODE> - if IP address of host could not be determined.<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/InetAddress.html#getCanonicalHostName()" title="class or interface in java.net"><CODE>InetAddress.getCanonicalHostName()</CODE></A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/SecurityManager.html#checkConnect(java.lang.String, int)" title="class or interface in java.lang"><CODE>SecurityManager.checkConnect(java.lang.String, int)</CODE></A></DL></DD></DL><HR><A NAME="process(org.xmpp.packet.Packet)"><!-- --></A><H3>process</H3><PRE>void <B>process</B>(<A HREF="../../../../org/xmpp/packet/Packet.html" title="class in org.xmpp.packet">Packet</A> 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></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>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> text)</PRE><DL><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>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.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>text</CODE> - the XML stanzas represented kept in a String.</DL></DD></DL><HR><A NAME="validate()"><!-- --></A><H3>validate</H3><PRE>boolean <B>validate</B>()</PRE><DL><DD>Verifies that the connection is still live. Typically this is done by sending a whitespace character between packets. // TODO No one is sending this message now. Delete it?<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the socket remains valid, false otherwise.</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/session/RemoteSessionLocator.html" title="interface in org.jivesoftware.openfire.session"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/jivesoftware/openfire/session/Session.html" target="_top"><B>FRAMES</B></A> <A HREF="Session.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 | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <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 + -