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.DnssecMode
Determines the requested DNSSEC security mode.
|
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 DnsName |
host |
protected InetAddress |
hostAddress |
protected int |
port |
protected ProxyInfo |
proxy |
protected DomainBareJid |
xmppServiceDomain
The XMPP domain of the XMPP Service.
|
Modifier | Constructor and Description |
---|---|
protected |
ConnectionConfiguration(ConnectionConfiguration.Builder<?,?> builder) |
Modifier and Type | Method and Description |
---|---|
EntityBareJid |
getAuthzid()
Returns the optional XMPP address to be requested as the SASL authorization identity.
|
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. |
X509TrustManager |
getCustomX509TrustManager() |
SmackDebuggerFactory |
getDebuggerFactory()
Returns the Smack debugger factory.
|
ConnectionConfiguration.DnssecMode |
getDnssecMode() |
Set<String> |
getEnabledSaslMechanisms()
Return the explicitly enabled SASL mechanisms.
|
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.
|
ProxyInfo |
getProxyInfo()
Get the configured proxy information (if any).
|
Resourcepart |
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.
|
DomainBareJid |
getServiceName()
Deprecated.
use
getXMPPServiceDomain() instead. |
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.
|
DomainBareJid |
getXMPPServiceDomain()
Returns the XMPP domain used by this configuration.
|
boolean |
isCompressionEnabled()
Returns true if the connection is going to use stream compression.
|
boolean |
isEnabledSaslMechanism(String saslMechanism)
Check if the given SASL mechansism is enabled in this connection configuration.
|
boolean |
isSendPresence()
Returns true if an available presence should be sent when logging in while reconnecting.
|
protected final DomainBareJid xmppServiceDomain
protected final InetAddress hostAddress
protected final int port
protected final boolean allowNullOrEmptyUsername
protected ConnectionConfiguration(ConnectionConfiguration.Builder<?,?> builder)
@Deprecated public DomainBareJid getServiceName()
getXMPPServiceDomain()
instead.public DomainBareJid getXMPPServiceDomain()
public ConnectionConfiguration.SecurityMode getSecurityMode()
ConnectionConfiguration.SecurityMode.ifpossible
.public ConnectionConfiguration.DnssecMode getDnssecMode()
public X509TrustManager getCustomX509TrustManager()
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 SmackDebuggerFactory getDebuggerFactory()
null
public CallbackHandler getCallbackHandler()
public SocketFactory getSocketFactory()
public ProxyInfo getProxyInfo()
null
.public CharSequence getUsername()
public String getPassword()
public Resourcepart getResource()
public EntityBareJid getAuthzid()
public boolean isSendPresence()
public boolean isCompressionEnabled()
public boolean isEnabledSaslMechanism(String saslMechanism)
saslMechanism
- public Set<String> getEnabledSaslMechanisms()
null
if no SASL mechanisms where
explicitly enabled, i.e. all SALS mechanisms supported and announced by the service will be considered.null
.