public abstract class ConnectionConfiguration
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ConnectionConfiguration.Builder<B extends ConnectionConfiguration.Builder<B,C>,C extends ConnectionConfiguration>
A builder for XMPP connection configurations.
|
static class |
ConnectionConfiguration.SecurityMode
An enumeration for TLS security modes that are available when making a connection
to the XMPP server.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowNullOrEmptyUsername |
protected java.lang.String |
host |
protected int |
port |
protected ProxyInfo |
proxy |
protected java.lang.String |
serviceName
Hostname of the XMPP server.
|
Modifier | Constructor and Description |
---|---|
protected |
ConnectionConfiguration(ConnectionConfiguration.Builder<?,?> builder) |
Modifier and Type | Method and Description |
---|---|
javax.security.auth.callback.CallbackHandler |
getCallbackHandler()
Returns a CallbackHandler to obtain information, such as the password or
principal information during the SASL authentication.
|
javax.net.ssl.SSLContext |
getCustomSSLContext()
Gets the custom SSLContext previously set with
ConnectionConfiguration.Builder.setCustomSSLContext(SSLContext) for
SSL sockets. |
java.lang.String[] |
getEnabledSSLCiphers()
Return the enabled SSL/TLS ciphers.
|
java.lang.String[] |
getEnabledSSLProtocols()
Return the enabled SSL/TLS protocols.
|
javax.net.ssl.HostnameVerifier |
getHostnameVerifier()
Returns the configured HostnameVerifier of this ConnectionConfiguration or the Smack default
HostnameVerifier configured with
SmackConfiguration.setDefaultHostnameVerifier(HostnameVerifier) . |
java.lang.String |
getKeystorePath()
Retuns the path to the keystore file.
|
java.lang.String |
getKeystoreType()
Returns the keystore type, or null if it's not set.
|
java.lang.String |
getPassword()
Returns the password to use when trying to reconnect to the server.
|
java.lang.String |
getPKCS11Library()
Returns the PKCS11 library file location, needed when the
Keystore type is PKCS11.
|
java.lang.String |
getResource()
Returns the resource to use when trying to reconnect to the server.
|
ConnectionConfiguration.SecurityMode |
getSecurityMode()
Returns the TLS security mode used when making the connection.
|
java.lang.String |
getServiceName()
Returns the server name of the target server.
|
javax.net.SocketFactory |
getSocketFactory()
Returns the socket factory used to create new xmppConnection sockets.
|
java.lang.CharSequence |
getUsername()
Returns the username to use when trying to reconnect to the server.
|
boolean |
isCompressionEnabled()
Returns true if the connection is going to use stream compression.
|
boolean |
isDebuggerEnabled()
Returns true if the new connection about to be establish is going to be debugged.
|
boolean |
isLegacySessionDisabled()
Deprecated.
Smack processes the 'optional' element of the session stream feature.
|
boolean |
isSendPresence()
Returns true if an available presence should be sent when logging in while reconnecting.
|
protected final java.lang.String serviceName
protected final java.lang.String host
protected final int port
protected final ProxyInfo proxy
protected final boolean allowNullOrEmptyUsername
protected ConnectionConfiguration(ConnectionConfiguration.Builder<?,?> builder)
public java.lang.String getServiceName()
public ConnectionConfiguration.SecurityMode getSecurityMode()
ConnectionConfiguration.SecurityMode.ifpossible
.public java.lang.String getKeystorePath()
public java.lang.String getKeystoreType()
public java.lang.String getPKCS11Library()
public javax.net.ssl.SSLContext getCustomSSLContext()
ConnectionConfiguration.Builder.setCustomSSLContext(SSLContext)
for
SSL sockets. This is null by default.public java.lang.String[] getEnabledSSLProtocols()
public java.lang.String[] getEnabledSSLCiphers()
public javax.net.ssl.HostnameVerifier getHostnameVerifier()
SmackConfiguration.setDefaultHostnameVerifier(HostnameVerifier)
.null
public boolean isDebuggerEnabled()
SmackConfiguration.DEBUG
is used.@Deprecated public boolean isLegacySessionDisabled()
Session
will be requested on login if the server
supports it. Although this was mandatory on RFC 3921, RFC 6120/6121 don't
even mention this part of the protocol.ConnectionConfiguration.Builder.setLegacySessionDisabled(boolean)
public javax.security.auth.callback.CallbackHandler getCallbackHandler()
public javax.net.SocketFactory getSocketFactory()
public java.lang.CharSequence getUsername()
public java.lang.String getPassword()
public java.lang.String getResource()
public boolean isSendPresence()
public boolean isCompressionEnabled()