public abstract class ClientConnectionConfiguration extends java.lang.Object implements ConnectionConfiguration
A base class for connection configurations.
All connection methods have a few properties in common, which are abstracted in this class. Among these common properties are hostname, port, proxy, security settings and a timeout.
Modifier and Type | Class and Description |
---|---|
static class |
ClientConnectionConfiguration.Builder<T extends ClientConnectionConfiguration.Builder<T>>
An abstract builder class for building immutable configuration objects.
|
Modifier and Type | Method and Description |
---|---|
abstract Connection |
createConnection(XmppSession xmppSession)
A factory method to create the connection.
|
ChannelEncryption |
getChannelEncryption()
Gets the channel encryption mode used for the connection, which indicates, if and how the connection is to be secured.
|
java.util.List<CompressionMethod> |
getCompressionMethods()
Gets the compression methods.
|
int |
getConnectTimeout()
Gets the timeout for connection establishment.
|
java.lang.String |
getHostname()
Gets the hostname.
|
javax.net.ssl.HostnameVerifier |
getHostnameVerifier()
Gets the hostname verifier.
|
int |
getPort()
Gets the port.
|
java.net.Proxy |
getProxy()
Gets the proxy.
|
javax.net.ssl.SSLContext |
getSSLContext()
Gets the SSL context.
|
java.lang.String |
toString() |
public abstract Connection createConnection(XmppSession xmppSession) throws java.lang.Exception
A factory method to create the connection.
xmppSession
- The XMPP session, which is associated with the connection.java.lang.Exception
- Any exception which may occur during connection establishment.public final java.lang.String getHostname()
Gets the hostname.
public final int getPort()
Gets the port.
public final java.net.Proxy getProxy()
Gets the proxy.
public final ChannelEncryption getChannelEncryption()
ConnectionConfiguration
Gets the channel encryption mode used for the connection, which indicates, if and how the connection is to be secured.
getChannelEncryption
in interface ConnectionConfiguration
public final javax.net.ssl.SSLContext getSSLContext()
Gets the SSL context.
getSSLContext
in interface ConnectionConfiguration
public final javax.net.ssl.HostnameVerifier getHostnameVerifier()
Gets the hostname verifier.
public final int getConnectTimeout()
Gets the timeout for connection establishment.
public final java.util.List<CompressionMethod> getCompressionMethods()
Gets the compression methods.
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2014–2019 XMPP.rocks. All rights reserved.