Class WrapperSslServerSocketFactory


  • public class WrapperSslServerSocketFactory
    extends javax.net.ssl.SSLServerSocketFactory
    SSL server socket factory that wraps the default one to do extra initialization. Configures the cipher suites and the SSL certificate request.
    Author:
    Jerome Louvel
    • Constructor Detail

      • WrapperSslServerSocketFactory

        public WrapperSslServerSocketFactory​(DefaultSslContextFactory contextFactory,
                                             javax.net.ssl.SSLServerSocketFactory wrappedSocketFactory)
        Constructor.
        Parameters:
        contextFactory - The parent SSL context factory.
        wrappedSocketFactory - The wrapped SSL server socket factory.
    • Method Detail

      • createServerSocket

        public java.net.ServerSocket createServerSocket()
                                                 throws java.io.IOException
        Overrides:
        createServerSocket in class javax.net.ServerSocketFactory
        Throws:
        java.io.IOException
      • createServerSocket

        public java.net.ServerSocket createServerSocket​(int port)
                                                 throws java.io.IOException
        Specified by:
        createServerSocket in class javax.net.ServerSocketFactory
        Throws:
        java.io.IOException
      • createServerSocket

        public java.net.ServerSocket createServerSocket​(int port,
                                                        int backLog)
                                                 throws java.io.IOException
        Specified by:
        createServerSocket in class javax.net.ServerSocketFactory
        Throws:
        java.io.IOException
      • createServerSocket

        public java.net.ServerSocket createServerSocket​(int port,
                                                        int backLog,
                                                        java.net.InetAddress ifAddress)
                                                 throws java.io.IOException
        Specified by:
        createServerSocket in class javax.net.ServerSocketFactory
        Throws:
        java.io.IOException
      • getContextFactory

        public DefaultSslContextFactory getContextFactory()
        Returns the parent SSL context factory.
        Returns:
        The parent SSL context factory.
      • getDefaultCipherSuites

        public java.lang.String[] getDefaultCipherSuites()
        Specified by:
        getDefaultCipherSuites in class javax.net.ssl.SSLServerSocketFactory
      • getSupportedCipherSuites

        public java.lang.String[] getSupportedCipherSuites()
        Specified by:
        getSupportedCipherSuites in class javax.net.ssl.SSLServerSocketFactory
      • getWrappedSocketFactory

        public javax.net.ssl.SSLServerSocketFactory getWrappedSocketFactory()
        Returns the wrapped SSL server socket factory.
        Returns:
        The wrapped SSL server socket factory.
      • initSslServerSocket

        protected javax.net.ssl.SSLServerSocket initSslServerSocket​(javax.net.ssl.SSLServerSocket sslServerSocket)
        Initializes the SSL server socket. Configures the certificate request (need or want) and the enabled cipher suites.
        Parameters:
        sslServerSocket - The server socket to initialize.
        Returns:
        The initialized server socket.