org.apache.activemq.broker
Class SslBrokerService
java.lang.Object
org.apache.activemq.broker.BrokerService
org.apache.activemq.broker.SslBrokerService
- All Implemented Interfaces:
- java.io.Serializable, Service
public class SslBrokerService
- extends BrokerService
A BrokerService that allows access to the key and trust managers used by SSL connections.
There is no reason to use this class unless SSL is being used AND the key and trust managers need to be specified
from within code. In fact, if the URI passed to this class does not have an "ssl" scheme, this class will
pass all work on to its superclass.
- Author:
- sepandm@gmail.com (Sepand)
- See Also:
- Serialized Form
Method Summary |
TransportConnector |
addSslConnector(java.lang.String bindAddress,
javax.net.ssl.KeyManager[] km,
javax.net.ssl.TrustManager[] tm,
java.security.SecureRandom random)
Adds a new transport connector for the given bind address. |
TransportConnector |
addSslConnector(java.net.URI bindAddress,
javax.net.ssl.KeyManager[] km,
javax.net.ssl.TrustManager[] tm,
java.security.SecureRandom random)
Adds a new transport connector for the given bind address. |
protected TransportServer |
createSslTransportServer(java.net.URI brokerURI,
javax.net.ssl.KeyManager[] km,
javax.net.ssl.TrustManager[] tm,
java.security.SecureRandom random)
Creates a TransportServer that uses the given key and trust managers. |
Methods inherited from class org.apache.activemq.broker.BrokerService |
addConnector, addConnector, addConnector, addConnector, addInterceptors, addJmsConnector, addNetworkConnector, addNetworkConnector, addNetworkConnector, addProxyConnector, addProxyConnector, addProxyConnector, addService, addShutdownHook, configureService, containerShutdown, createAdminConnectionContext, createBroker, createBrokerObjectName, createDefaultDestinationInterceptor, createNetworkConnectorObjectName, createPersistenceAdapter, createPersistenceFactory, createRegionBroker, createTransportConnector, deleteAllMessages, getAdminConnectionContext, getAdminView, getBroker, getBrokerName, getBrokerObjectName, getDataDirectory, getDestinationInterceptors, getDestinationPolicy, getDestinations, getJmsBridgeConnectors, getManagementContext, getMasterConnectorURI, getMemoryManager, getMessageAuthorizationPolicy, getNetworkConnectors, getNetworkConnectorURIs, getPendingDurableSubscriberPolicy, getPersistenceAdapter, getPersistenceFactory, getPersistenceTaskRunnerFactory, getPersistenceThreadPriority, getPlugins, getPort, getProxyConnectors, getServices, getTaskRunnerFactory, getTempDataStore, getTmpDataDirectory, getTransportConnectors, getTransportConnectorURIs, getVmConnectorURI, isAdvisorySupport, isDeleteAllMessagesOnStartup, isKeepDurableSubsActive, isPersistent, isPopulateJMSXUserID, isShutdownOnMasterFailure, isSlave, isStarted, isUseJmx, isUseLoggingForShutdownErrors, isUseShutdownHook, isUseVirtualTopics, logError, masterFailed, processHelperProperties, registerConnectorMBean, registerFTConnectorMBean, registerJmsConnectorMBean, registerNetworkConnectorMBean, registerProxyConnectorMBean, removeConnector, removeJmsConnector, removeNetworkConnector, removeShutdownHook, setAdminView, setAdvisorySupport, setBrokerName, setBrokerObjectName, setDataDirectory, setDeleteAllMessagesOnStartup, setDestinationFactory, setDestinationInterceptors, setDestinationPolicy, setDestinations, setJmsBridgeConnectors, setKeepDurableSubsActive, setManagementContext, setMasterConnectorURI, setMemoryManager, setMessageAuthorizationPolicy, setNetworkConnectors, setNetworkConnectorURIs, setPendingDurableSubscriberPolicy, setPersistenceAdapter, setPersistenceFactory, setPersistenceTaskRunnerFactory, setPersistenceThreadPriority, setPersistent, setPlugins, setPopulateJMSXUserID, setProxyConnectors, setServices, setShutdownOnMasterFailure, setTaskRunnerFactory, setTempDataStore, setTmpDataDirectory, setTransportConnectors, setTransportConnectorURIs, setUseJmx, setUseLoggingForShutdownErrors, setUseShutdownHook, setUseVirtualTopics, setVmConnectorURI, start, startAllConnectors, startDestinations, startDestinationsInPersistenceStore, startTransportConnector, stop, stopAllConnectors, unregisterConnectorMBean, unregisterNetworkConnectorMBean |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SslBrokerService
public SslBrokerService()
addSslConnector
public TransportConnector addSslConnector(java.lang.String bindAddress,
javax.net.ssl.KeyManager[] km,
javax.net.ssl.TrustManager[] tm,
java.security.SecureRandom random)
throws java.lang.Exception
- Adds a new transport connector for the given bind address.
If the transport created uses SSL, it will also use the key and trust
managers provided. Otherwise, this is the same as calling
addConnector.
- Parameters:
bindAddress
- The address to bind to.km
- The KeyManager to be used.tm
- The trustmanager to be used.random
- The source of randomness for the generator.
- Returns:
- the newly connected and added transport connector.
- Throws:
java.lang.Exception
addSslConnector
public TransportConnector addSslConnector(java.net.URI bindAddress,
javax.net.ssl.KeyManager[] km,
javax.net.ssl.TrustManager[] tm,
java.security.SecureRandom random)
throws java.lang.Exception
- Adds a new transport connector for the given bind address.
If the transport created uses SSL, it will also use the key and trust
managers provided. Otherwise, this is the same as calling
addConnector.
- Parameters:
bindAddress
- The URI to bind to.km
- The KeyManager to be used.tm
- The trustmanager to be used.random
- The source of randomness for the generator.
- Returns:
- the newly created and added transport connector.
- Throws:
java.lang.Exception
createSslTransportServer
protected TransportServer createSslTransportServer(java.net.URI brokerURI,
javax.net.ssl.KeyManager[] km,
javax.net.ssl.TrustManager[] tm,
java.security.SecureRandom random)
throws java.io.IOException,
java.security.KeyManagementException
- Creates a TransportServer that uses the given key and trust managers.
The last three parameters will be eventually passed to SSLContext.init.
- Parameters:
brokerURI
- The URI to bind to.km
- The KeyManager to be used.tm
- The trustmanager to be used.random
- The source of randomness for the generator.
- Returns:
- A new TransportServer that uses the given managers.
- Throws:
java.io.IOException
- If cannot handle URI.
java.security.KeyManagementException
- Passed on from SSL.
Copyright © 2011 Apache Software Foundation. All Rights Reserved.