Class EPPSSLContext


  • public class EPPSSLContext
    extends java.lang.Object
    The EPPSSLContext contains initialized SSL objects that can be used to establish SSL connections. The attributes include an SSLContext, an SSLSocketFactory, and an optional set of SSL enabled protocols.
    • Constructor Summary

      Constructors 
      Constructor Description
      EPPSSLContext()
      Default constructor.
      EPPSSLContext​(EPPSSLConfig aSSLConfig)
      Creates an instance of EPPSSLContext that takes an EPPSSLConfig.
      EPPSSLContext​(javax.net.ssl.SSLContext aSSLContext)
      Creates an instance of EPPSSLContext with an SSLContext.
      EPPSSLContext​(javax.net.ssl.SSLContext aSSLContext, java.lang.String[] aSslEnabledProtocols, java.lang.String[] aSslEnabledCipherSuites)
      Creates an instance of EPPSSLContext with the SSLContext, SSL enabled protocols, and SSL enabled cipher suites.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      EPPSSLConfig getSslConfig()
      Gets the EPPSSLConfig that's associated with this EPPSSLContext.
      javax.net.ssl.SSLContext getSSLContext()
      Gets the SSLContext.
      java.lang.String[] getSSLEnabledCipherSuites()
      Gets the optional SSL enabled cipher suites String array.
      java.lang.String[] getSSLEnabledProtocols()
      Gets the optional SSL enabled protocols String array.
      javax.net.ssl.SSLSocketFactory getSSLSocketFactory()
      Gets the SSLSocketFactory.
      boolean hasSSLContext()
      Checks whether SSLContext has been set.
      boolean hasSSLEnabledCipherSuites()
      Checks whether SSL enabled cipher suites has been set.
      boolean hasSSLEnabledProtocols()
      Checks whether SSL enabled protocols has been set.
      boolean hasSSLSocketFactory()
      Checks whether SSLSocketFactory has been set.
      void setSslConfig​(EPPSSLConfig aSslConfig)
      Sets the EPPSSLConfig that's associated with this EPPSSLContext.
      void setSSLContext​(javax.net.ssl.SSLContext aSSLContext)
      Sets the SSLContext.
      void setSSLEnabledCipherSuites​(java.lang.String[] aSslEnabledCipherSuites)
      Sets the optional SSL enabled cipher suites String array.
      void setSSLEnabledProtocols​(java.lang.String[] aSslEnabledProtocols)
      Sets the optional SSL enabled protocols String array.
      void setSSLSocketFactory​(javax.net.ssl.SSLSocketFactory aSSLSocketFactory)
      Sets the SSLSocketFactory, which should be the SocketFactory of the SSLContext attribute.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EPPSSLContext

        public EPPSSLContext()
        Default constructor.
      • EPPSSLContext

        public EPPSSLContext​(EPPSSLConfig aSSLConfig)
        Creates an instance of EPPSSLContext that takes an EPPSSLConfig.
        Parameters:
        aSSLConfig - EPPSSLConfig instance
      • EPPSSLContext

        public EPPSSLContext​(javax.net.ssl.SSLContext aSSLContext)
        Creates an instance of EPPSSLContext with an SSLContext.
        Parameters:
        aSSLContext - SSLContext instance
      • EPPSSLContext

        public EPPSSLContext​(javax.net.ssl.SSLContext aSSLContext,
                             java.lang.String[] aSslEnabledProtocols,
                             java.lang.String[] aSslEnabledCipherSuites)
        Creates an instance of EPPSSLContext with the SSLContext, SSL enabled protocols, and SSL enabled cipher suites.
        Parameters:
        aSSLContext - SSLContext instance
        aSslEnabledProtocols - String array of enabled SSL protocols
        aSslEnabledCipherSuites - String array of enabled SSL cipher suites
    • Method Detail

      • getSSLContext

        public javax.net.ssl.SSLContext getSSLContext()
        Gets the SSLContext.
        Returns:
        SSLContext instance
      • setSSLContext

        public void setSSLContext​(javax.net.ssl.SSLContext aSSLContext)
        Sets the SSLContext.
        Parameters:
        aSSLContext - SSLContext to set
      • hasSSLContext

        public boolean hasSSLContext()
        Checks whether SSLContext has been set.
        Returns:
        true if set; false otherwise.
      • getSSLSocketFactory

        public javax.net.ssl.SSLSocketFactory getSSLSocketFactory()
        Gets the SSLSocketFactory.
        Returns:
        SSLSocketFactory instance
      • setSSLSocketFactory

        public void setSSLSocketFactory​(javax.net.ssl.SSLSocketFactory aSSLSocketFactory)
        Sets the SSLSocketFactory, which should be the SocketFactory of the SSLContext attribute.
        Parameters:
        aSSLSocketFactory - SSLSocketFactory instance
      • hasSSLSocketFactory

        public boolean hasSSLSocketFactory()
        Checks whether SSLSocketFactory has been set.
        Returns:
        true if set; false otherwise.
      • getSSLEnabledProtocols

        public java.lang.String[] getSSLEnabledProtocols()
        Gets the optional SSL enabled protocols String array.
        Returns:
        String array if set; null otherwise.
      • setSSLEnabledProtocols

        public void setSSLEnabledProtocols​(java.lang.String[] aSslEnabledProtocols)
        Sets the optional SSL enabled protocols String array.
        Parameters:
        aSslEnabledProtocols - String array of enabled SSL protocols
      • hasSSLEnabledProtocols

        public boolean hasSSLEnabledProtocols()
        Checks whether SSL enabled protocols has been set.
        Returns:
        true if set; false otherwise.
      • getSSLEnabledCipherSuites

        public java.lang.String[] getSSLEnabledCipherSuites()
        Gets the optional SSL enabled cipher suites String array.
        Returns:
        String array if set; null otherwise.
      • setSSLEnabledCipherSuites

        public void setSSLEnabledCipherSuites​(java.lang.String[] aSslEnabledCipherSuites)
        Sets the optional SSL enabled cipher suites String array.
        Parameters:
        aSslEnabledCipherSuites - String array of enabled SSL cipher suites
      • hasSSLEnabledCipherSuites

        public boolean hasSSLEnabledCipherSuites()
        Checks whether SSL enabled cipher suites has been set.
        Returns:
        true if set; false otherwise.
      • getSslConfig

        public EPPSSLConfig getSslConfig()
        Gets the EPPSSLConfig that's associated with this EPPSSLContext. The SSL configuration may be null, since an instantiated SSLContext could have been used.
        Returns:
        the sslConfig EPPSSLConfig if defined; null otherwise.
      • setSslConfig

        public void setSslConfig​(EPPSSLConfig aSslConfig)
        Sets the EPPSSLConfig that's associated with this EPPSSLContext.
        Parameters:
        aSslConfig - the SSL Config to set