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 |
keyStoreKeyPassword |
protected String |
keyStorePassword |
protected String |
keyStoreType |
protected SecureRandom |
secureRandom |
protected TrustManager[] |
trustManager |
protected String |
trustStore |
protected String |
trustStorePassword |
protected String |
trustStoreType |
alwaysSessionAsync, brokerURL, clientID, DEFAULT_BROKER_BIND_URL, DEFAULT_BROKER_URL, DEFAULT_PASSWORD, DEFAULT_PRODUCER_WINDOW_SIZE, DEFAULT_USER, dispatchAsync, password, userName, xaAckMode
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() |
protected InputStream |
getInputStream(String urlOrResource) |
String |
getKeyStore() |
String |
getKeyStoreKeyPassword() |
String |
getKeyStorePassword() |
String |
getKeyStoreType() |
String |
getTrustStore() |
String |
getTrustStorePassword() |
String |
getTrustStoreType() |
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 |
setKeyStoreKeyPassword(String keyStoreKeyPassword)
The password to match the key from the keyStore.
|
void |
setKeyStorePassword(String keyStorePassword)
The password to match the key store specified by
setKeyStore . |
void |
setKeyStoreType(String type) |
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 . |
void |
setTrustStoreType(String type) |
buildFromMap, buildFromProperties, configureConnection, copy, createActiveMQConnection, createActiveMQConnection, createActiveMQConnection, createConnection, createConnection, createQueueConnection, createQueueConnection, createTopicConnection, createTopicConnection, getAuditDepth, getAuditMaximumProducerNumber, getBlobTransferPolicy, getBrokerURL, getClientID, getClientIdGenerator, getClientIDPrefix, getClientInternalExceptionListener, getCloseTimeout, getConnectionIdGenerator, getConnectResponseTimeout, getConsumerFailoverRedeliveryWaitPeriod, getExceptionListener, getMaxThreadPoolSize, getOptimizeAcknowledgeTimeOut, getOptimizedAckScheduledAckInterval, getPassword, getPrefetchPolicy, getProducerWindowSize, getRedeliveryPolicy, getRedeliveryPolicyMap, getRejectedTaskHandler, getSendTimeout, getSessionTaskRunner, getStats, getTransformer, getTransportListener, getTrustedPackages, getUserName, getWarnAboutUnstartedConnectionTimeout, isAlwaysSessionAsync, isAlwaysSyncSend, isCheckForDuplicates, isConsumerExpiryCheckEnabled, isCopyMessageOnSend, isDisableTimeStampsByDefault, isDispatchAsync, isExclusiveConsumer, isMessagePrioritySupported, isNestedMapAndListEnabled, isNonBlockingRedelivery, isObjectMessageSerializationDefered, isOptimizeAcknowledge, isOptimizedMessageDispatch, isRmIdFromConnectionId, isSendAcksAsync, isStatsEnabled, isTransactedIndividualAck, isTrustAllPackages, isUseAsyncSend, isUseCompression, isUseDedicatedTaskRunner, isUseRetroactiveConsumer, isWatchTopicAdvisories, populateProperties, setAlwaysSessionAsync, setAlwaysSyncSend, setAuditDepth, setAuditMaximumProducerNumber, setBlobTransferPolicy, setBrokerURL, setCheckForDuplicates, setClientID, setClientIdGenerator, setClientIDPrefix, setClientInternalExceptionListener, setCloseTimeout, setConnectionIdGenerator, setConnectionIDPrefix, setConnectResponseTimeout, setConsumerExpiryCheckEnabled, setConsumerFailoverRedeliveryWaitPeriod, setCopyMessageOnSend, setDisableTimeStampsByDefault, setDispatchAsync, setExceptionListener, setExclusiveConsumer, setMaxThreadPoolSize, setMessagePrioritySupported, setNestedMapAndListEnabled, setNonBlockingRedelivery, setObjectMessageSerializationDefered, setOptimizeAcknowledge, setOptimizeAcknowledgeTimeOut, setOptimizedAckScheduledAckInterval, setOptimizedMessageDispatch, setPassword, setPrefetchPolicy, setProducerWindowSize, setRedeliveryPolicy, setRedeliveryPolicyMap, setRejectedTaskHandler, setRmIdFromConnectionId, setSendAcksAsync, setSendTimeout, setSessionTaskRunner, setStatsEnabled, setTransactedIndividualAck, setTransformer, setTransportListener, setTrustAllPackages, setTrustedPackages, setUseAsyncSend, setUseCompression, setUseDedicatedTaskRunner, setUseRetroactiveConsumer, setUserName, setWarnAboutUnstartedConnectionTimeout, setWatchTopicAdvisories
getProperties, getReference, readExternal, setProperties, writeExternal
protected KeyManager[] keyManager
protected TrustManager[] trustManager
protected SecureRandom secureRandom
protected String trustStoreType
protected String trustStore
protected String trustStorePassword
protected String keyStoreType
protected String keyStorePassword
protected String keyStoreKeyPassword
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 getInputStream(String urlOrResource) throws IOException
IOException
public String getTrustStoreType()
public void setTrustStoreType(String type)
public String getTrustStore()
public void setTrustStore(String trustStore) throws Exception
jks
format) containing
one or more trusted certificates.trustStore
- If specified with a scheme, treat as a URL, otherwise treat as
a classpath resource.Exception
public String getTrustStorePassword()
public void setTrustStorePassword(String trustStorePassword)
setTrustStore
.trustStorePassword
- The password used to unlock the keystore file.public String getKeyStoreType()
public void setKeyStoreType(String type)
public String getKeyStore()
public void setKeyStore(String keyStore) throws Exception
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.Exception
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.public String getKeyStoreKeyPassword()
public void setKeyStoreKeyPassword(String keyStoreKeyPassword)
keyStoreKeyPassword
- The password for the private key stored in the
keyStore if different from keyStorePassword.Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.