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 String |
host |
protected InetAddress |
hostAddress |
protected int |
port |
protected ProxyInfo |
proxy |
protected org.jxmpp.jid.DomainBareJid |
xmppServiceDomain
The XMPP domain of the XMPP Service.
|
Modifier | Constructor and Description |
---|---|
protected |
ConnectionConfiguration(ConnectionConfiguration.Builder<?,?> builder) |
Modifier and Type | Method and Description |
---|---|
org.jxmpp.jid.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() |
ConnectionConfiguration.DnssecMode |
getDnssecMode() |
Set<String> |
getEnabledSaslMechanisms() |
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).
|
org.jxmpp.jid.parts.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.
|
org.jxmpp.jid.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.
|
org.jxmpp.jid.DomainBareJid |
getXMPPServiceDomain()
Returns the XMPP domain used by this configuration.
|
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 |
isEnabledSaslMechanism(String saslMechanism)
Check if the given SASL mechansism is enabled in this connection configuration.
|
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 org.jxmpp.jid.DomainBareJid xmppServiceDomain
protected final InetAddress hostAddress
protected final int port
protected final boolean allowNullOrEmptyUsername
protected ConnectionConfiguration(ConnectionConfiguration.Builder<?,?> builder)
@Deprecated public org.jxmpp.jid.DomainBareJid getServiceName()
getXMPPServiceDomain()
instead.public org.jxmpp.jid.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 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 ProxyInfo getProxyInfo()
null
.public CharSequence getUsername()
public String getPassword()
public org.jxmpp.jid.parts.Resourcepart getResource()
public org.jxmpp.jid.EntityBareJid getAuthzid()
public boolean isSendPresence()
public boolean isCompressionEnabled()
public boolean isEnabledSaslMechanism(String saslMechanism)
saslMechanism
- public Set<String> getEnabledSaslMechanisms()