@Deprecated public class TcpConnectionConfiguration extends TcpConnectionConfiguration<java.net.Socket>
A configuration for a TCP connection. 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.
TcpConnectionConfiguration tcpConfiguration = TcpConnectionConfiguration.builder()
.hostname("localhost")
.port(5222)
.sslContext(sslContext)
.channelEncryption(ChannelEncryption.DISABLED)
.build();
This class is immutable.
BoshConnectionConfiguration,
SocketConnection| Modifier and Type | Class and Description |
|---|---|
static class |
TcpConnectionConfiguration.Builder
Deprecated.
A builder to create a
TcpConnectionConfiguration instance. |
| Modifier and Type | Method and Description |
|---|---|
static TcpConnectionConfiguration.Builder |
builder()
Deprecated.
Creates a new builder for this class.
|
Connection |
createConnection(XmppSession xmppSession)
Deprecated.
A factory method to create the connection.
|
static TcpConnectionConfiguration |
getDefault()
Deprecated.
Gets the default configuration.
|
javax.net.SocketFactory |
getSocketFactory()
Deprecated.
Gets the socket factory.
|
static void |
setDefault(TcpConnectionConfiguration configuration)
Deprecated.
Sets the default configuration.
|
java.lang.String |
toString()
Deprecated.
|
getKeepAliveIntervalgetChannelEncryption, getCompressionMethods, getConnectTimeout, getHostname, getHostnameVerifier, getPort, getProxy, getSSLContextpublic static TcpConnectionConfiguration.Builder builder()
Creates a new builder for this class.
public static TcpConnectionConfiguration getDefault()
Gets the default configuration.
public static void setDefault(TcpConnectionConfiguration configuration)
Sets the default configuration.
configuration - The default configuration.public final Connection createConnection(XmppSession xmppSession) throws java.lang.Exception
ClientConnectionConfigurationA factory method to create the connection.
createConnection in class ClientConnectionConfigurationxmppSession - The XMPP session, which is associated with the connection.java.lang.Exception - Any exception which may occur during connection establishment.public final javax.net.SocketFactory getSocketFactory()
Gets the socket factory.
public final java.lang.String toString()
toString in class ClientConnectionConfigurationCopyright © 2014–2019 XMPP.rocks. All rights reserved.