public abstract class ConnectionConfiguration extends 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 String |
host |
protected int |
port |
protected ProxyInfo |
proxy |
protected String |
serviceName
Hostname of the XMPP server.
|
Modifier | Constructor and Description |
---|---|
protected |
ConnectionConfiguration(ConnectionConfiguration.Builder<?,?> builder) |
Modifier and Type | Method and Description |
---|---|
CallbackHandler |
getCallbackHandler()
Returns a CallbackHandler to obtain information, such as the password or
principal information during the SASL authentication.
|
SSLContext |
getCustomSSLContext()
Gets the custom SSLContext previously set with
ConnectionConfiguration.Builder.setCustomSSLContext(SSLContext) for
SSL sockets. |
String[] |
getEnabledSSLCiphers()
Return the enabled SSL/TLS ciphers.
|
String[] |
getEnabledSSLProtocols()
Return the enabled SSL/TLS protocols.
|
HostnameVerifier |
getHostnameVerifier()
Returns the configured HostnameVerifier of this ConnectionConfiguration or the Smack default
HostnameVerifier configured with
SmackConfiguration.setDefaultHostnameVerifier(HostnameVerifier) . |
String |
getKeystorePath()
Retuns the path to the keystore file.
|
String |
getKeystoreType()
Returns the keystore type, or null if it's not set.
|
String |
getPassword()
Returns the password to use when trying to reconnect to the server.
|
String |
getPKCS11Library()
Returns the PKCS11 library file location, needed when the
Keystore type is PKCS11.
|
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.
|
String |
getServiceName()
Returns the server name of the target server.
|
SocketFactory |
getSocketFactory()
Returns the socket factory used to create new xmppConnection sockets.
|
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 String serviceName
protected final int port
protected final boolean allowNullOrEmptyUsername
protected ConnectionConfiguration(ConnectionConfiguration.Builder<?,?> builder)
public String getServiceName()
public ConnectionConfiguration.SecurityMode getSecurityMode()
ConnectionConfiguration.SecurityMode.ifpossible
.public String getKeystorePath()
public String getKeystoreType()
public String getPKCS11Library()
public SSLContext getCustomSSLContext()
ConnectionConfiguration.Builder.setCustomSSLContext(SSLContext)
for
SSL sockets. This is null by default.public String[] getEnabledSSLProtocols()
public String[] getEnabledSSLCiphers()
public 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 CallbackHandler getCallbackHandler()
public SocketFactory getSocketFactory()
public CharSequence getUsername()
public String getPassword()
public String getResource()
public boolean isSendPresence()
public boolean isCompressionEnabled()