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

📄 connection.html

📁 开源软件openfire的API文件。进行openfire的二次开发所必需的工具。
💻 HTML
📖 第 1 页 / 共 4 页
字号:
    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="getLocalCertificates()"><!-- --></A><H3>getLocalCertificates</H3><PRE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/security/cert/Certificate.html" title="class or interface in java.security.cert">Certificate</A>[] <B>getLocalCertificates</B>()</PRE><DL><DD>Returns the local underlying <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/security/cert/X509Certificate.html" title="class or interface in javax.security.cert"><CODE>X509Certificate</CODE></A> for the connection.<P><DD><DL><DT><B>Returns:</B><DD><tt>null</tt> if no <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/security/cert/X509Certificate.html" title="class or interface in javax.security.cert"><CODE>X509Certificate</CODE></A> is present for the connection.</DL></DD></DL><HR><A NAME="getPeerCertificates()"><!-- --></A><H3>getPeerCertificates</H3><PRE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/security/cert/Certificate.html" title="class or interface in java.security.cert">Certificate</A>[] <B>getPeerCertificates</B>()</PRE><DL><DD>Returns the underlying <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/security/cert/X509Certificate.html" title="class or interface in javax.security.cert"><CODE>X509Certificate</CODE></A> for the connection of the peer.<P><DD><DL><DT><B>Returns:</B><DD><tt>null</tt> if no <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/security/cert/X509Certificate.html" title="class or interface in javax.security.cert"><CODE>X509Certificate</CODE></A> is present for the connection.</DL></DD></DL><HR><A NAME="setUsingSelfSignedCertificate(boolean)"><!-- --></A><H3>setUsingSelfSignedCertificate</H3><PRE>void <B>setUsingSelfSignedCertificate</B>(boolean&nbsp;isSelfSigned)</PRE><DL><DD>Keeps track if the other peer of this session presented a self-signed certificate. When using self-signed certificate for server-2-server sessions then SASL EXTERNAL will not be used and instead server-dialback will be preferred for vcerifying the identify of the remote server.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>isSelfSigned</CODE> - true if the other peer presented a self-signed certificate.</DL></DD></DL><HR><A NAME="isUsingSelfSignedCertificate()"><!-- --></A><H3>isUsingSelfSignedCertificate</H3><PRE>boolean <B>isUsingSelfSignedCertificate</B>()</PRE><DL><DD>Returns true if the other peer of this session presented a self-signed certificate. When using self-signed certificate for server-2-server sessions then SASL EXTERNAL will not be used and instead server-dialback will be preferred for vcerifying the identify of the remote server.<P><DD><DL><DT><B>Returns:</B><DD>true if the other peer of this session presented a self-signed certificate.</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></DL><HR><A NAME="systemShutdown()"><!-- --></A><H3>systemShutdown</H3><PRE>void <B>systemShutdown</B>()</PRE><DL><DD>Notification message indicating that the server is being shutdown. Implementors should send a stream error whose condition is system-shutdown before closing the connection.<P><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><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><DT><B>Returns:</B><DD>true if the connection is secure (e.g. SSL/TLS)</DL></DD></DL><HR><A NAME="registerCloseListener(org.jivesoftware.openfire.ConnectionCloseListener, java.lang.Object)"><!-- --></A><H3>registerCloseListener</H3><PRE>void <B>registerCloseListener</B>(<A HREF="../../../org/jivesoftware/openfire/ConnectionCloseListener.html" title="interface in org.jivesoftware.openfire">ConnectionCloseListener</A>&nbsp;listener,                           <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;handbackMessage)</PRE><DL><DD>Registers a listener for close event notification. Registrations after the Session is closed will be immediately notified <em>before</em> the registration call returns (within the context of the registration call). An optional handback object can be associated with the registration if the same listener is registered to listen for multiple connection closures.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the listener to register for events.<DD><CODE>handbackMessage</CODE> - the object to send in the event notification.</DL></DD></DL><HR><A NAME="removeCloseListener(org.jivesoftware.openfire.ConnectionCloseListener)"><!-- --></A><H3>removeCloseListener</H3><PRE>void <B>removeCloseListener</B>(<A HREF="../../../org/jivesoftware/openfire/ConnectionCloseListener.html" title="interface in org.jivesoftware.openfire">ConnectionCloseListener</A>&nbsp;listener)</PRE><DL><DD>Removes a registered close event listener. Registered listeners must be able to receive close events up until the time this method returns. (i.e. it is possible to call unregister, receive a close event registration, and then have the unregister call return.)<P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the listener to deregister for close events.</DL></DD></DL><HR><A NAME="deliver(org.xmpp.packet.Packet)"><!-- --></A><H3>deliver</H3><PRE>void <B>deliver</B>(<A HREF="../../../org/xmpp/packet/Packet.html" title="class in org.xmpp.packet">Packet</A>&nbsp;packet)             throws <A HREF="../../../org/jivesoftware/openfire/auth/UnauthorizedException.html" title="class in org.jivesoftware.openfire.auth">UnauthorizedException</A></PRE><DL><DD>Delivers the packet to this connection without checking the recipient. The method essentially calls <code>socket.send(packet.getWriteBuffer())</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>packet</CODE> - the packet to deliver.<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 a permission error was detected.</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>&nbsp;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/Connection.html#deliver(org.xmpp.packet.Packet)"><CODE>deliver(org.xmpp.packet.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><DT><B>Parameters:</B><DD><CODE>text</CODE> - the XML stanzas represented kept in a String.</DL></DD></DL><HR><A NAME="isFlashClient()"><!-- --></A><H3>isFlashClient</H3><PRE>boolean <B>isFlashClient</B>()</PRE><DL><DD>Returns true if the connected client is a flash client. Flash clients need to receive a special character (i.e. \0) at the end of each xml packet. Flash clients may send the character \0 in incoming packets and may start a connection using another openning tag such as: "flash:client".<P><DD><DL><DT><B>Returns:</B><DD>true if the connected client is a flash client.</DL></DD></DL><HR><A NAME="setFlashClient(boolean)"><!-- --></A><H3>setFlashClient</H3><PRE>void <B>setFlashClient</B>(boolean&nbsp;flashClient)</PRE><DL><DD>Sets whether the connected client is a flash client. Flash clients need to receive a special character (i.e. \0) at the end of each xml packet. Flash clients may send the character \0 in incoming packets and may start a connection using another openning tag such as: "flash:client".<P><DD><DL><DT><B>Parameters:</B><DD><CODE>flashClient</CODE> - true if the if the connection is a flash client.</DL></DD></DL><HR><A NAME="getMajorXMPPVersion()"><!-- --></A><H3>getMajorXMPPVersion</H3><PRE>int <B>getMajorXMPPVersion</B>()</PRE><DL><DD>Returns the major version of XMPP being used by this connection (major_version.minor_version. In most cases, the version should be "1.0". However, older clients using the "Jabber" protocol do not set a version. In that case, the version is "0.0".<P><DD><DL><DT><B>Returns:</B><DD>the major XMPP version being used by this connection.</DL></DD></DL><HR><A NAME="getMinorXMPPVersion()"><!-- --></A><H3>getMinorXMPPVersion</H3><PRE>int <B>getMinorXMPPVersion</B>()</PRE><DL><DD>Returns the minor version of XMPP being used by this connection (major_version.minor_version. In most cases, the version should be "1.0". However, older clients using the "Jabber" protocol do not set a version. In that case, the version is "0.0".<P><DD><DL>

⌨️ 快捷键说明

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