Package rocks.xmpp.core.net.client
Class ClientConnectionConfiguration
- java.lang.Object
-
- rocks.xmpp.core.net.client.ClientConnectionConfiguration
-
- All Implemented Interfaces:
ConnectionConfiguration
- Direct Known Subclasses:
BoshConnectionConfiguration,NettyTcpConnectionConfiguration,SocketConnectionConfiguration,TcpConnectionConfiguration,WebSocketConnectionConfiguration
public abstract class ClientConnectionConfiguration extends 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClientConnectionConfiguration.Builder<T extends ClientConnectionConfiguration.Builder<T,C>,C extends ClientConnectionConfiguration>An abstract builder class for building immutable configuration objects.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract CompletableFuture<Connection>createConnection(XmppSession xmppSession, SessionOpen sessionOpen)A factory method to create the connection.ChannelEncryptiongetChannelEncryption()Gets the channel encryption mode used for the connection, which indicates, if and how the connection is to be secured.List<CompressionMethod>getCompressionMethods()Gets the compression methods.intgetConnectTimeout()Gets the timeout for connection establishment.StringgetHostname()Gets the hostname.HostnameVerifiergetHostnameVerifier()Gets the hostname verifier.intgetPort()Gets the port.ProxygetProxy()Gets the proxy.SSLContextgetSSLContext()Gets the SSL context.StringtoString()
-
-
-
Method Detail
-
createConnection
public abstract CompletableFuture<Connection> createConnection(XmppSession xmppSession, SessionOpen sessionOpen)
A factory method to create the connection.- Parameters:
xmppSession- The XMPP session, which is associated with the connection.sessionOpen- The session open element.- Returns:
- The connection.
-
getHostname
public final String getHostname()
Gets the hostname.- Returns:
- The hostname.
-
getPort
public final int getPort()
Gets the port.- Returns:
- The port.
-
getProxy
public final Proxy getProxy()
Gets the proxy.- Returns:
- The proxy.
-
getChannelEncryption
public final ChannelEncryption getChannelEncryption()
Description copied from interface:ConnectionConfigurationGets the channel encryption mode used for the connection, which indicates, if and how the connection is to be secured.- Specified by:
getChannelEncryptionin interfaceConnectionConfiguration- Returns:
- The channel encryption mode.
-
getSSLContext
public final SSLContext getSSLContext()
Gets the SSL context.- Specified by:
getSSLContextin interfaceConnectionConfiguration- Returns:
- The SSL context.
-
getHostnameVerifier
public final HostnameVerifier getHostnameVerifier()
Gets the hostname verifier.- Returns:
- The hostname verifier.
-
getConnectTimeout
public final int getConnectTimeout()
Gets the timeout for connection establishment.- Returns:
- The timeout.
-
getCompressionMethods
public final List<CompressionMethod> getCompressionMethods()
Gets the compression methods.- Returns:
- The compression methods.
-
-