Package rocks.xmpp.core.net.client
Class SocketConnectionConfiguration.Builder
- java.lang.Object
-
- rocks.xmpp.core.net.client.ClientConnectionConfiguration.Builder<SocketConnectionConfiguration.Builder,TcpConnectionConfiguration>
-
- rocks.xmpp.core.net.client.SocketConnectionConfiguration.Builder
-
- Enclosing class:
- SocketConnectionConfiguration
public static final class SocketConnectionConfiguration.Builder extends ClientConnectionConfiguration.Builder<SocketConnectionConfiguration.Builder,TcpConnectionConfiguration>
A builder to create aTcpConnectionConfiguration
instance.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SocketConnectionConfiguration
build()
Builds the connection configuration.SocketConnectionConfiguration.Builder
keepAliveInterval(int keepAliveInterval)
Sets the whitespace keep-alive interval in seconds.SocketConnectionConfiguration.Builder
socketFactory(SocketFactory socketFactory)
Sets a socket factory which creates the socket.-
Methods inherited from class rocks.xmpp.core.net.client.ClientConnectionConfiguration.Builder
channelEncryption, compressionMethods, connector, connectTimeout, getConnector, hostname, hostnameVerifier, port, proxy, sslContext
-
-
-
-
Method Detail
-
keepAliveInterval
public final SocketConnectionConfiguration.Builder keepAliveInterval(int keepAliveInterval)
Sets the whitespace keep-alive interval in seconds. If the interval is negative, no whitespace will be sent at all.- Parameters:
keepAliveInterval
- The whitespace keep-alive interval.- Returns:
- The builder.
-
socketFactory
public SocketConnectionConfiguration.Builder socketFactory(SocketFactory socketFactory)
Sets a socket factory which creates the socket. This can be useful if you want connect to the legacy SSL port (usually 5223) and the connection is encrypted right from the beginning.However, usually, there's no need to set a custom socket factory.
- Parameters:
socketFactory
- The socket factory.- Returns:
- The builder.
- See Also:
ClientConnectionConfiguration.Builder.channelEncryption(ChannelEncryption)
-
build
public SocketConnectionConfiguration build()
Description copied from class:ClientConnectionConfiguration.Builder
Builds the connection configuration.- Specified by:
build
in classClientConnectionConfiguration.Builder<SocketConnectionConfiguration.Builder,TcpConnectionConfiguration>
- Returns:
- The concrete connection configuration.
-
-