Interface SSLFactory


  • public interface SSLFactory
    Simplifies the creation of new SSLEngines and SSLContext objects that can be used by components that require SSL support.
    • Method Detail

      • createSSLEngine

        javax.net.ssl.SSLEngine createSSLEngine​(java.lang.String peerHost,
                                                int peerPort,
                                                SSLFactory.Mode mode)
        Create SSLEngine for given host name and port number. This engine manages the handshake process and encryption/decryption with this remote host.
        Parameters:
        peerHost - The remote host name
        peerPort - The remote port number
        mode - The local SSL mode, Client or Server
        Returns:
        SSLEngine
      • getSSLContext

        javax.net.ssl.SSLContext getSSLContext()
        Returns a configured SSLContext. This context supports creating SSLEngines and for the loaded truststore and keystore. An SSLEngine must be created for each connection.
        Returns:
        SSLContext.
      • getNewInstance

        static SSLFactory getNewInstance​(SSLConfig sslConfig)
                                  throws java.lang.Exception
        Instantiate SSLFactory based on the provided config. Uses the SSLConfig.sslFactory class name to choose the desired implementation to instantiate via reflection.
        Parameters:
        sslConfig - the SSLConfig provided to the SSLFactory that is instantiated.
        Returns:
        a new SSLFactory based on the provided config.
        Throws:
        java.lang.Exception