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

📄 connectionconfiguration.html

📁 开源项目smack的API文件
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#isSASLAuthenticationEnabled()">isSASLAuthenticationEnabled</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the client is going to use SASL authentication when logging into the server.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#isSelfSignedCertificateEnabled()">isSelfSignedCertificateEnabled</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if self-signed certificates are going to be accepted.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#isVerifyChainEnabled()">isVerifyChainEnabled</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the whole chain of certificates presented by the server are going to be checked.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#isVerifyRootCAEnabled()">isVerifyRootCAEnabled</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if root CA checking is going to be done.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#setCompressionEnabled(boolean)">setCompressionEnabled</A></B>(boolean&nbsp;compressionEnabled)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets if the connection is going to use stream compression.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#setDebuggerEnabled(boolean)">setDebuggerEnabled</A></B>(boolean&nbsp;debuggerEnabled)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets if the new connection about to be establish is going to be debugged.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#setExpiredCertificatesCheckEnabled(boolean)">setExpiredCertificatesCheckEnabled</A></B>(boolean&nbsp;expiredCertificatesCheckEnabled)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets if certificates presented by the server are going to be checked for their validity.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#setNotMatchingDomainCheckEnabled(boolean)">setNotMatchingDomainCheckEnabled</A></B>(boolean&nbsp;notMatchingDomainCheckEnabled)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets if certificates presented by the server are going to be checked for their domain.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#setReconnectionAllowed(boolean)">setReconnectionAllowed</A></B>(boolean&nbsp;isAllowed)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets if the reconnection mechanism is allowed to be used.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#setSASLAuthenticationEnabled(boolean)">setSASLAuthenticationEnabled</A></B>(boolean&nbsp;saslAuthenticationEnabled)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets whether the client will use SASL authentication when logging into the server.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#setSecurityMode(org.jivesoftware.smack.ConnectionConfiguration.SecurityMode)">setSecurityMode</A></B>(<A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.SecurityMode.html" title="enum in org.jivesoftware.smack">ConnectionConfiguration.SecurityMode</A>&nbsp;securityMode)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the TLS security mode used when making the connection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#setSelfSignedCertificateEnabled(boolean)">setSelfSignedCertificateEnabled</A></B>(boolean&nbsp;selfSignedCertificateEnabled)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets if self-signed certificates are going to be accepted.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#setSocketFactory(javax.net.SocketFactory)">setSocketFactory</A></B>(javax.net.SocketFactory&nbsp;socketFactory)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the socket factory used to create new xmppConnection sockets.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#setTruststorePassword(java.lang.String)">setTruststorePassword</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;truststorePassword)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the password to use to access the trust store file.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#setTruststorePath(java.lang.String)">setTruststorePath</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;truststorePath)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the path to the trust store file.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#setTruststoreType(java.lang.String)">setTruststoreType</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;truststoreType)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the trust store type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#setVerifyChainEnabled(boolean)">setVerifyChainEnabled</A></B>(boolean&nbsp;verifyChainEnabled)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets if the whole chain of certificates presented by the server are going to be checked.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#setVerifyRootCAEnabled(boolean)">setVerifyRootCAEnabled</A></B>(boolean&nbsp;verifyRootCAEnabled)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets if root CA checking is going to be done.</TD></TR></TABLE>&nbsp;<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.3/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.3/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.3/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.3/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/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.3/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ========= 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="ConnectionConfiguration(java.lang.String)"><!-- --></A><H3>ConnectionConfiguration</H3><PRE>public <B>ConnectionConfiguration</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;serviceName)</PRE><DL><DD>Creates a new ConnectionConfiguration for the specified service name. A DNS SRV lookup will be performed to find out the actual host address and port to use for the connection.<P><DL><DT><B>Parameters:</B><DD><CODE>serviceName</CODE> - the name of the service provided by an XMPP server.</DL></DL><HR><A NAME="ConnectionConfiguration(java.lang.String, int, java.lang.String)"><!-- --></A><H3>ConnectionConfiguration</H3><PRE>public <B>ConnectionConfiguration</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;host,                               int&nbsp;port,                               <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;serviceName)</PRE><DL><DD>Creates a new ConnectionConfiguration using the specified host, port and service name. This is useful for manually overriding the DNS SRV lookup process that's used with the <A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#ConnectionConfiguration(java.lang.String)"><CODE>ConnectionConfiguration(String)</CODE></A> constructor. For example, say that an XMPP server is running at localhost in an internal network on port 5222 but is configured to think that it's "example.com" for testing purposes. This constructor is necessary to connect to the server in that case since a DNS SRV lookup for example.com would not point to the local testing server.<P><DL><DT><B>Parameters:</B><DD><CODE>host</CODE> - the host where the XMPP server is running.<DD><CODE>port</CODE> - the port where the XMPP is listening.<DD><CODE>serviceName</CODE> - the name of the service provided by an XMPP server.</DL></DL><HR><A NAME="ConnectionConfiguration(java.lang.String, int)"><!-- --></A><H3>ConnectionConfiguration</H3><PRE>public <B>ConnectionConfiguration</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;host,                               int&nbsp;port)</PRE><DL><DD>Creates a new ConnectionConfiguration for a connection that will connect to the desired host and port.<P><DL><DT><B>Parameters:</B><DD><CODE>host</CODE> - the host where the XMPP server is running.<DD><CODE>port</CODE> - the port where the XMPP is listening.</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="getServiceName()"><!-- --></A><H3>getServiceName</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getServiceName</B>()</PRE><DL><DD>Returns the server name of the target server.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the server name of the target server.</DL></DD></DL><HR><A NAME="getHost()"><!-- --></A><H3>getHost</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getHost</B>()</PRE><DL><DD>Returns the host to use when establishing the connection. The host and port to use might have been resolved by a DNS lookup as specified by the XMPP spec (and therefore may not match the <A HREF="../../../org/jivesoftware/smack/ConnectionConfiguration.html#getServiceName()"><CODE>service name</CODE></A>.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the host to use when establishing the connection.</DL></DD></DL><HR><A NAME="getPort()"><!-- --></A><H3>getPort</H3><PRE>public int <B>getPort</B>()</PRE><DL><DD>Returns the port to use when establishing the connection. The host and port to use might have been resolved by a DNS lookup as specified by the XMPP spec.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the port to use when establishing the connection.</DL></DD></DL>

⌨️ 快捷键说明

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