Class AbstractSslContextFactory

  • All Implemented Interfaces:
    Serializable, javax.cache.configuration.Factory<SSLContext>
    Direct Known Subclasses:
    SslContextFactory

    public abstract class AbstractSslContextFactory
    extends Object
    implements javax.cache.configuration.Factory<SSLContext>
    Represents abstract implementation of SSL Context Factory that caches the result of the first successful attempt to create an SSLContext and always returns it as a result of further invocations of the create()} method.
    See Also:
    Serialized Form
    • Constructor Detail

      • AbstractSslContextFactory

        public AbstractSslContextFactory()
    • Method Detail

      • getProtocol

        public String getProtocol()
        Gets protocol for secure transport.
        Returns:
        SSL protocol name.
      • setProtocol

        public void setProtocol​(String proto)
        Sets protocol for secure transport. If not specified, DFLT_SSL_PROTOCOL will be used.
        Parameters:
        proto - SSL protocol name.
      • setCipherSuites

        public void setCipherSuites​(String... cipherSuites)
        Sets enabled cipher suites.
        Parameters:
        cipherSuites - enabled cipher suites.
      • getCipherSuites

        public String[] getCipherSuites()
        Gets enabled cipher suites.
        Returns:
        enabled cipher suites
      • getProtocols

        public String[] getProtocols()
        Gets enabled protocols.
        Returns:
        Enabled protocols.
      • setProtocols

        public void setProtocols​(String... protocols)
        Sets enabled protocols.
        Parameters:
        protocols - Enabled protocols.
      • checkNullParameter

        protected void checkNullParameter​(Object param,
                                          String name)
                                   throws SSLException
        Parameters:
        param - Value.
        name - Name.
        Throws:
        SSLException - If null.
      • checkParameters

        protected abstract void checkParameters()
                                         throws SSLException
        Checks that all required parameters are set.
        Throws:
        SSLException - If any of required parameters is missing.
      • createKeyManagers

        protected abstract KeyManager[] createKeyManagers()
                                                   throws SSLException
        Returns:
        Created Key Managers.
        Throws:
        SSLException - If Key Managers could not be created.
      • createTrustManagers

        protected abstract TrustManager[] createTrustManagers()
                                                       throws SSLException
        Returns:
        Created Trust Managers.
        Throws:
        SSLException - If Trust Managers could not be created.
      • create

        public SSLContext create()
        Specified by:
        create in interface javax.cache.configuration.Factory<SSLContext>