Class 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 using Socket.

    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
    • 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.
      • 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.