Class ActiveMQSslConnectionFactory

    • Field Detail

      • trustStoreType

        protected String trustStoreType
      • trustStore

        protected String trustStore
      • trustStorePassword

        protected String trustStorePassword
      • keyStoreType

        protected String keyStoreType
      • keyStore

        protected String keyStore
      • keyStorePassword

        protected String keyStorePassword
      • keyStoreKeyPassword

        protected String keyStoreKeyPassword
    • Constructor Detail

      • ActiveMQSslConnectionFactory

        public ActiveMQSslConnectionFactory()
      • ActiveMQSslConnectionFactory

        public ActiveMQSslConnectionFactory​(String brokerURL)
      • ActiveMQSslConnectionFactory

        public ActiveMQSslConnectionFactory​(URI brokerURL)
    • Method Detail

      • setKeyAndTrustManagers

        public void setKeyAndTrustManagers​(KeyManager[] km,
                                           TrustManager[] tm,
                                           SecureRandom random)
        Sets the key and trust managers used when creating SSL connections.
        km - The KeyManagers used.
        tm - The TrustManagers used.
        random - The SecureRandom number used.
      • createTransport

        protected Transport createTransport()
                                     throws JMSException
        Overriding to make special considerations for SSL connections. If we are not using SSL, the superclass's method is called. If we are using SSL, an SslConnectionFactory is used and it is given the needed key and trust managers.
        createTransport in class ActiveMQConnectionFactory
        The newly created Transport.
        JMSException - If unable to create trasnport.
      • getTrustStoreType

        public String getTrustStoreType()
      • setTrustStoreType

        public void setTrustStoreType​(String type)
      • getTrustStore

        public String getTrustStore()
      • setTrustStore

        public void setTrustStore​(String trustStore)
                           throws Exception
        The location of a keystore file (in jks format) containing one or more trusted certificates.
        trustStore - If specified with a scheme, treat as a URL, otherwise treat as a classpath resource.
      • getTrustStorePassword

        public String getTrustStorePassword()
      • setTrustStorePassword

        public void setTrustStorePassword​(String trustStorePassword)
        The password to match the trust store specified by setTrustStore(java.lang.String).
        trustStorePassword - The password used to unlock the keystore file.
      • getKeyStoreType

        public String getKeyStoreType()
      • setKeyStoreType

        public void setKeyStoreType​(String type)
      • getKeyStore

        public String getKeyStore()
      • setKeyStore

        public void setKeyStore​(String keyStore)
                         throws Exception
        The location of a keystore file (in jks format) containing a certificate and its private key.
        keyStore - If specified with a scheme, treat as a URL, otherwise treat as a classpath resource.
      • getKeyStorePassword

        public String getKeyStorePassword()
      • setKeyStorePassword

        public void setKeyStorePassword​(String keyStorePassword)
        The password to match the key store specified by setKeyStore(java.lang.String).
        keyStorePassword - The password, which is used both to unlock the keystore file and as the pass phrase for the private key stored in the keystore.
      • getKeyStoreKeyPassword

        public String getKeyStoreKeyPassword()
      • setKeyStoreKeyPassword

        public void setKeyStoreKeyPassword​(String keyStoreKeyPassword)
        The password to match the key from the keyStore.
        keyStoreKeyPassword - The password for the private key stored in the keyStore if different from keyStorePassword.