Class SslSocketManager

    • Constructor Detail

      • SslSocketManager

        @Deprecated
        public SslSocketManager​(java.lang.String name,
                                java.io.OutputStream os,
                                java.net.Socket sock,
                                SslConfiguration sslConfig,
                                java.net.InetAddress inetAddress,
                                java.lang.String host,
                                int port,
                                int connectTimeoutMillis,
                                int reconnectionDelayMillis,
                                boolean immediateFail,
                                Layout<? extends java.io.Serializable> layout,
                                int bufferSize)
        Parameters:
        name - the unique name of this connection
        os - the OutputStream
        sock - the Socket
        inetAddress - the Internet address of the host
        host - the name of the host
        port - the port number on the host
        connectTimeoutMillis - the connect timeout in milliseconds
        reconnectionDelayMillis - Reconnection interval.
        immediateFail - True if the write should fail if no socket is immediately available.
        layout - the Layout
        bufferSize - The buffer size.
      • SslSocketManager

        public SslSocketManager​(java.lang.String name,
                                java.io.OutputStream os,
                                java.net.Socket sock,
                                SslConfiguration sslConfig,
                                java.net.InetAddress inetAddress,
                                java.lang.String host,
                                int port,
                                int connectTimeoutMillis,
                                int reconnectionDelayMillis,
                                boolean immediateFail,
                                Layout<? extends java.io.Serializable> layout,
                                int bufferSize,
                                SocketOptions socketOptions)
        Parameters:
        name - The unique name of this connection.
        os - The OutputStream.
        sock - The Socket.
        inetAddress - The Internet address of the host.
        host - The name of the host.
        port - The port number on the host.
        connectTimeoutMillis - the connect timeout in milliseconds.
        reconnectionDelayMillis - Reconnection interval.
        immediateFail - True if the write should fail if no socket is immediately available.
        layout - The Layout.
        bufferSize - The buffer size.
    • Method Detail

      • getSocketManager

        public static SslSocketManager getSocketManager​(SslConfiguration sslConfig,
                                                        java.lang.String host,
                                                        int port,
                                                        int connectTimeoutMillis,
                                                        int reconnectDelayMillis,
                                                        boolean immediateFail,
                                                        Layout<? extends java.io.Serializable> layout,
                                                        int bufferSize,
                                                        SocketOptions socketOptions)
      • createSslConfigurationId

        private static java.lang.String createSslConfigurationId​(SslConfiguration sslConfig)
        Creates a unique identifier using the certificate issuers and serial numbers of the given SSL configuration.
        Parameters:
        sslConfig - an SSL configuration
        Returns:
        a unique identifier extracted from the given SSL configuration
      • createSocket

        protected java.net.Socket createSocket​(java.net.InetSocketAddress socketAddress)
                                        throws java.io.IOException
        Overrides:
        createSocket in class TcpSocketManager
        Throws:
        java.io.IOException
      • createSslSocketFactory

        private static javax.net.ssl.SSLSocketFactory createSslSocketFactory​(SslConfiguration sslConf)
      • createSocket

        private static java.net.Socket createSocket​(java.lang.String hostName,
                                                    java.net.InetSocketAddress socketAddress,
                                                    int connectTimeoutMillis,
                                                    SslConfiguration sslConfiguration,
                                                    SocketOptions socketOptions)
                                             throws java.io.IOException
        Throws:
        java.io.IOException