Class TLSSocketFactory

    • Field Detail

      • contextInitializer

        protected SSLContextInitializer contextInitializer
        SSLContextInitializer used for initializing SSL contexts.
    • Constructor Detail

      • TLSSocketFactory

        public TLSSocketFactory()
    • Method Detail

      • getSSLContextInitializer

        public SSLContextInitializer getSSLContextInitializer()
        Returns the SSL context initializer.
        Returns:
        SSLContextInitializer
      • setSSLContextInitializer

        public void setSSLContextInitializer​(SSLContextInitializer initializer)
        Sets the SSL context initializer.
        Parameters:
        initializer - to create SSL contexts with
      • initialize

        public void initialize()
                        throws java.security.GeneralSecurityException
        Creates the underlying SSLContext using truststore and keystore attributes and makes this factory ready for use. Must be called before factory can be used.
        Specified by:
        initialize in class AbstractTLSSocketFactory
        Throws:
        java.security.GeneralSecurityException - if the SSLContext cannot be created
      • getDefault

        public static javax.net.SocketFactory getDefault()
        This returns the default SSL socket factory.
        Returns:
        SocketFactory
      • toString

        public java.lang.String toString()
        Provides a descriptive string representation of this instance.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String of the form $Classname::factory=$factory.