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

📄 virtualconnection.html

📁 开源软件openfire的API文件。进行openfire的二次开发所必需的工具。
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#getTlsPolicy()">Connection</A></CODE></B></DD><DD>Returns whether TLS is mandatory, optional or is disabled. When TLS is mandatory clients are required to secure their connections or otherwise their connections will be closed. On the other hand, when TLS is disabled clients are not allowed to secure their connections using TLS. Their connections will be closed if they try to secure the connection. in this last case.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#getTlsPolicy()">getTlsPolicy</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html" title="interface in org.jivesoftware.openfire">Connection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>whether TLS is mandatory, optional or is disabled.</DL></DD></DL><HR><A NAME="isCompressed()"><!-- --></A><H3>isCompressed</H3><PRE>public boolean <B>isCompressed</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#isCompressed()">Connection</A></CODE></B></DD><DD>Returns true if the connection is using compression.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#isCompressed()">isCompressed</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html" title="interface in org.jivesoftware.openfire">Connection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the connection is using compression.</DL></DD></DL><HR><A NAME="isFlashClient()"><!-- --></A><H3>isFlashClient</H3><PRE>public boolean <B>isFlashClient</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#isFlashClient()">Connection</A></CODE></B></DD><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>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#isFlashClient()">isFlashClient</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html" title="interface in org.jivesoftware.openfire">Connection</A></CODE></DL></DD><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>public void <B>setFlashClient</B>(boolean&nbsp;flashClient)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#setFlashClient(boolean)">Connection</A></CODE></B></DD><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>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#setFlashClient(boolean)">setFlashClient</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html" title="interface in org.jivesoftware.openfire">Connection</A></CODE></DL></DD><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="setXMPPVersion(int, int)"><!-- --></A><H3>setXMPPVersion</H3><PRE>public void <B>setXMPPVersion</B>(int&nbsp;majorVersion,                           int&nbsp;minorVersion)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#setXMPPVersion(int, int)">Connection</A></CODE></B></DD><DD>Sets the XMPP version information. 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>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#setXMPPVersion(int, int)">setXMPPVersion</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html" title="interface in org.jivesoftware.openfire">Connection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>majorVersion</CODE> - the major version.<DD><CODE>minorVersion</CODE> - the minor version.</DL></DD></DL><HR><A NAME="setLanaguage(java.lang.String)"><!-- --></A><H3>setLanaguage</H3><PRE>public void <B>setLanaguage</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;language)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#setLanaguage(java.lang.String)">Connection</A></CODE></B></DD><DD>Sets the language code that should be used for this connection (e.g. "en").<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#setLanaguage(java.lang.String)">setLanaguage</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html" title="interface in org.jivesoftware.openfire">Connection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>language</CODE> - the language code.</DL></DD></DL><HR><A NAME="setCompressionPolicy(org.jivesoftware.openfire.Connection.CompressionPolicy)"><!-- --></A><H3>setCompressionPolicy</H3><PRE>public void <B>setCompressionPolicy</B>(<A HREF="../../../../org/jivesoftware/openfire/Connection.CompressionPolicy.html" title="enum in org.jivesoftware.openfire">Connection.CompressionPolicy</A>&nbsp;compressionPolicy)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#setCompressionPolicy(org.jivesoftware.openfire.Connection.CompressionPolicy)">Connection</A></CODE></B></DD><DD>Sets whether compression is enabled or is disabled.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#setCompressionPolicy(org.jivesoftware.openfire.Connection.CompressionPolicy)">setCompressionPolicy</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html" title="interface in org.jivesoftware.openfire">Connection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>compressionPolicy</CODE> - whether Compression is enabled or is disabled.</DL></DD></DL><HR><A NAME="setTlsPolicy(org.jivesoftware.openfire.Connection.TLSPolicy)"><!-- --></A><H3>setTlsPolicy</H3><PRE>public void <B>setTlsPolicy</B>(<A HREF="../../../../org/jivesoftware/openfire/Connection.TLSPolicy.html" title="enum in org.jivesoftware.openfire">Connection.TLSPolicy</A>&nbsp;tlsPolicy)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#setTlsPolicy(org.jivesoftware.openfire.Connection.TLSPolicy)">Connection</A></CODE></B></DD><DD>Sets whether TLS is mandatory, optional or is disabled. When TLS is mandatory clients are required to secure their connections or otherwise their connections will be closed. On the other hand, when TLS is disabled clients are not allowed to secure their connections using TLS. Their connections will be closed if they try to secure the connection. in this last case.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#setTlsPolicy(org.jivesoftware.openfire.Connection.TLSPolicy)">setTlsPolicy</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html" title="interface in org.jivesoftware.openfire">Connection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>tlsPolicy</CODE> - whether TLS is mandatory, optional or is disabled.</DL></DD></DL><HR><A NAME="getPacketDeliverer()"><!-- --></A><H3>getPacketDeliverer</H3><PRE>public <A HREF="../../../../org/jivesoftware/openfire/PacketDeliverer.html" title="interface in org.jivesoftware.openfire">PacketDeliverer</A> <B>getPacketDeliverer</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#getPacketDeliverer()">Connection</A></CODE></B></DD><DD>Returns the packet deliverer to use when delivering a packet over the socket fails. The packet deliverer will retry to send the packet using some other connection, will store the packet offline for later retrieval or will just drop it.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#getPacketDeliverer()">getPacketDeliverer</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html" title="interface in org.jivesoftware.openfire">Connection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the packet deliverer to use when delivering a packet over the socket fails.</DL></DD></DL><HR><A NAME="startTLS(boolean, java.lang.String, org.jivesoftware.openfire.Connection.ClientAuth)"><!-- --></A><H3>startTLS</H3><PRE>public void <B>startTLS</B>(boolean&nbsp;clientMode,                     <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;remoteServer,                     <A HREF="../../../../org/jivesoftware/openfire/Connection.ClientAuth.html" title="enum in org.jivesoftware.openfire">Connection.ClientAuth</A>&nbsp;authentication)              throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#startTLS(boolean, java.lang.String, org.jivesoftware.openfire.Connection.ClientAuth)">Connection</A></CODE></B></DD><DD>Secures the plain connection by negotiating TLS with the other peer. In a server-2-server connection the server requesting the TLS negotiation will be the client and the other server will be the server during the TLS negotiation. Therefore, the server requesting the TLS negotiation must pass <code>true</code> in the <tt>clientMode</tt> parameter and the server receiving the TLS request must pass <code>false</code> in the <tt>clientMode</tt> parameter. Both servers should specify the xmpp domain of the other server in the <tt>remoteServer</tt> parameter.<p> In the case of client-2-server the XMPP server must pass <code>false</code> in the <tt>clientMode</tt> parameter since it will behave as the server in the TLS negotiation. The <tt>remoteServer</tt> parameter will always be <tt>null</tt>.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#startTLS(boolean, java.lang.String, org.jivesoftware.openfire.Connection.ClientAuth)">startTLS</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html" title="interface in org.jivesoftware.openfire">Connection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>clientMode</CODE> - boolean indicating if this entity is a client or a server in the TLS negotiation.<DD><CODE>remoteServer</CODE> - xmpp domain of the remote server or <tt>null</tt>. When null a       <A HREF="../../../../org/jivesoftware/openfire/net/ClientTrustManager.html" title="class in org.jivesoftware.openfire.net"><CODE>ClientTrustManager</CODE></A> will be used for verifying certificates       otherwise a <A HREF="../../../../org/jivesoftware/openfire/net/ServerTrustManager.html" title="class in org.jivesoftware.openfire.net"><CODE>ServerTrustManager</CODE></A> will be used.<DD><CODE>authentication</CODE> - policy to use for authenticating the remote peer.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></CODE> - if an error occured while securing the connection.</DL></DD></DL><HR><A NAME="addCompression()"><!-- --></A><H3>addCompression</H3><PRE>public void <B>addCompression</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#addCompression()">Connection</A></CODE></B></DD><DD>Adds the compression filter to the connection but only filter incoming traffic. Do not filter outgoing traffic since we still need to send an uncompressed stanza to the client indicating that he can start compressing the traffic. After we sent the uncompresses stanza we can start compression outgoing traffic as well.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html#addCompression()">addCompression</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/Connection.html" title="interface in org.jivesoftware.openfire">Connection</A></CODE></DL></DD>

⌨️ 快捷键说明

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