public class ActiveMQSslConnectionFactory extends ActiveMQConnectionFactory
setTrustStore
, setTrustStorePassword
, setKeyStore
,
and setKeyStorePassword
.
Call setKeyAndTrustManagers
.Modifier and Type | Field and Description |
---|---|
protected KeyManager[] |
keyManager |
protected String |
keyStore |
protected String |
keyStorePassword |
protected SecureRandom |
secureRandom |
protected TrustManager[] |
trustManager |
protected String |
trustStore |
protected String |
trustStorePassword |
alwaysSessionAsync, brokerURL, clientID, DEFAULT_BROKER_BIND_URL, DEFAULT_BROKER_URL, DEFAULT_CONNECTION_EXECUTOR, DEFAULT_PASSWORD, DEFAULT_PRODUCER_WINDOW_SIZE, DEFAULT_USER, dispatchAsync, password, userName
Constructor and Description |
---|
ActiveMQSslConnectionFactory() |
ActiveMQSslConnectionFactory(String brokerURL) |
ActiveMQSslConnectionFactory(URI brokerURL) |
Modifier and Type | Method and Description |
---|---|
protected KeyManager[] |
createKeyManager() |
protected Transport |
createTransport()
Overriding to make special considerations for SSL connections.
|
protected TrustManager[] |
createTrustManager() |
String |
getKeyStore() |
String |
getKeyStorePassword() |
String |
getTrustStore() |
String |
getTrustStorePassword() |
protected InputStream |
getUrlOrResourceAsStream(String urlOrResource) |
protected byte[] |
loadClientCredential(String fileName) |
void |
setKeyAndTrustManagers(KeyManager[] km,
TrustManager[] tm,
SecureRandom random)
Sets the key and trust managers used when creating SSL connections.
|
void |
setKeyStore(String keyStore)
The location of a keystore file (in
jks format) containing a certificate
and its private key. |
void |
setKeyStorePassword(String keyStorePassword)
The password to match the key store specified by
setKeyStore . |
void |
setTrustStore(String trustStore)
The location of a keystore file (in
jks format) containing one or more
trusted certificates. |
void |
setTrustStorePassword(String trustStorePassword)
The password to match the trust store specified by
setTrustStore . |
buildFromMap, buildFromProperties, configureConnection, copy, createActiveMQConnection, createActiveMQConnection, createActiveMQConnection, createConnection, createConnection, createQueueConnection, createQueueConnection, createTopicConnection, createTopicConnection, getAuditDepth, getAuditMaximumProducerNumber, getBlobTransferPolicy, getBrokerURL, getClientID, getClientIdGenerator, getClientIDPrefix, getClientInternalExceptionListener, getCloseTimeout, getConnectionIdGenerator, getConsumerFailoverRedeliveryWaitPeriod, getExceptionListener, getOptimizeAcknowledgeTimeOut, getPassword, getPrefetchPolicy, getProducerWindowSize, getRedeliveryPolicy, getSendTimeout, getStats, getTransformer, getTransportListener, getUserName, getWarnAboutUnstartedConnectionTimeout, isAlwaysSessionAsync, isAlwaysSyncSend, isCheckForDuplicates, isCopyMessageOnSend, isDisableTimeStampsByDefault, isDispatchAsync, isExclusiveConsumer, isMessagePrioritySupported, isNestedMapAndListEnabled, isNonBlockingRedelivery, isObjectMessageSerializationDefered, isOptimizeAcknowledge, isOptimizedMessageDispatch, isSendAcksAsync, isStatsEnabled, isTransactedIndividualAck, isUseAsyncSend, isUseCompression, isUseDedicatedTaskRunner, isUseRetroactiveConsumer, isWatchTopicAdvisories, populateProperties, setAlwaysSessionAsync, setAlwaysSyncSend, setAuditDepth, setAuditMaximumProducerNumber, setBlobTransferPolicy, setBrokerURL, setCheckForDuplicates, setClientID, setClientIdGenerator, setClientIDPrefix, setClientInternalExceptionListener, setCloseTimeout, setConnectionIdGenerator, setConnectionIDPrefix, setConsumerFailoverRedeliveryWaitPeriod, setCopyMessageOnSend, setDisableTimeStampsByDefault, setDispatchAsync, setExceptionListener, setExclusiveConsumer, setMessagePrioritySupported, setNestedMapAndListEnabled, setNonBlockingRedelivery, setObjectMessageSerializationDefered, setOptimizeAcknowledge, setOptimizeAcknowledgeTimeOut, setOptimizedMessageDispatch, setPassword, setPrefetchPolicy, setProducerWindowSize, setRedeliveryPolicy, setSendAcksAsync, setSendTimeout, setStatsEnabled, setTransactedIndividualAck, setTransformer, setTransportListener, setUseAsyncSend, setUseCompression, setUseDedicatedTaskRunner, setUseRetroactiveConsumer, setUserName, setWarnAboutUnstartedConnectionTimeout, setWatchTopicAdvisories
getProperties, getReference, readExternal, setProperties, writeExternal
protected KeyManager[] keyManager
protected TrustManager[] trustManager
protected SecureRandom secureRandom
protected String trustStore
protected String trustStorePassword
protected String keyStorePassword
public ActiveMQSslConnectionFactory()
public ActiveMQSslConnectionFactory(String brokerURL)
public ActiveMQSslConnectionFactory(URI brokerURL)
public void setKeyAndTrustManagers(KeyManager[] km, TrustManager[] tm, SecureRandom random)
km
- The KeyManagers used.tm
- The TrustManagers used.random
- The SecureRandom number used.protected Transport createTransport() throws javax.jms.JMSException
createTransport
in class ActiveMQConnectionFactory
javax.jms.JMSException
- If unable to create trasnport.protected TrustManager[] createTrustManager() throws Exception
Exception
protected KeyManager[] createKeyManager() throws Exception
Exception
protected byte[] loadClientCredential(String fileName) throws IOException
IOException
protected InputStream getUrlOrResourceAsStream(String urlOrResource) throws IOException
IOException
public String getTrustStore()
public void setTrustStore(String trustStore)
jks
format) containing one or more
trusted certificates.trustStore
- If specified with a scheme, treat as a URL, otherwise treat as a classpath resource.public String getTrustStorePassword()
public void setTrustStorePassword(String trustStorePassword)
setTrustStore
.trustStorePassword
- The password used to unlock the keystore file.public String getKeyStore()
public void setKeyStore(String keyStore)
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.public String getKeyStorePassword()
public void setKeyStorePassword(String keyStorePassword)
setKeyStore
.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.Copyright © 2005–2016. All rights reserved.