Package rocks.xmpp.core.net.client
Class SocketConnectionConfiguration
- java.lang.Object
-
- rocks.xmpp.core.net.client.ClientConnectionConfiguration
-
- rocks.xmpp.core.net.client.SocketConnectionConfiguration
-
- All Implemented Interfaces:
ConnectionConfiguration
@Deprecated(forRemoval=true) public final class SocketConnectionConfiguration extends ClientConnectionConfiguration
Deprecated, for removal: This API element is subject to removal in a future version.A configuration for a TCP connection usingSocket
.It allows you to configure various connection settings for a TCP socket connection, most importantly the host address and port, but also a whitespace keep-alive interval, a custom socket factory, a custom SSL context and compression methods.
Usage
In order to create an instance of this class you have to use the builder pattern as shown below.
SocketConnectionConfiguration socketConfiguration = SocketConnectionConfiguration.builder() .hostname("localhost") .port(5222) .sslContext(sslContext) .channelEncryption(ChannelEncryption.DISABLED) .build();
This class is immutable.
- See Also:
BoshConnectionConfiguration
,SocketConnection
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SocketConnectionConfiguration.Builder
Deprecated, for removal: This API element is subject to removal in a future version.A builder to create aTcpConnectionConfiguration
instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static SocketConnectionConfiguration.Builder
builder()
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new builder for this class.CompletableFuture<Connection>
createConnection(XmppSession xmppSession, SessionOpen sessionOpen)
Deprecated, for removal: This API element is subject to removal in a future version.A factory method to create the connection.static SocketConnectionConfiguration
getDefault()
Deprecated, for removal: This API element is subject to removal in a future version.Gets the default configuration.SocketFactory
getSocketFactory()
Deprecated, for removal: This API element is subject to removal in a future version.Gets the socket factory.static void
setDefault(SocketConnectionConfiguration configuration)
Deprecated, for removal: This API element is subject to removal in a future version.Sets the default configuration.-
Methods inherited from class rocks.xmpp.core.net.client.ClientConnectionConfiguration
getChannelEncryption, getCompressionMethods, getConnectTimeout, getHostname, getHostnameVerifier, getPort, getProxy, getSSLContext, toString
-
-
-
-
Method Detail
-
getDefault
public static SocketConnectionConfiguration getDefault()
Deprecated, for removal: This API element is subject to removal in a future version.Gets the default configuration.- Returns:
- The default configuration.
-
setDefault
public static void setDefault(SocketConnectionConfiguration configuration)
Deprecated, for removal: This API element is subject to removal in a future version.Sets the default configuration.- Parameters:
configuration
- The default configuration.
-
builder
public static SocketConnectionConfiguration.Builder builder()
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new builder for this class.- Returns:
- The builder.
-
createConnection
public final CompletableFuture<Connection> createConnection(XmppSession xmppSession, SessionOpen sessionOpen)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ClientConnectionConfiguration
A factory method to create the connection.- Specified by:
createConnection
in classClientConnectionConfiguration
- Parameters:
xmppSession
- The XMPP session, which is associated with the connection.sessionOpen
- The session open element.- Returns:
- The connection.
-
getSocketFactory
public final SocketFactory getSocketFactory()
Deprecated, for removal: This API element is subject to removal in a future version.Gets the socket factory.- Returns:
- The socket factory.
-
-