org.apache.activemq.broker
Class SslBrokerService

java.lang.Object
  extended by org.apache.activemq.broker.BrokerService
      extended by org.apache.activemq.broker.SslBrokerService
All Implemented Interfaces:
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)

Field Summary
 
Fields inherited from class org.apache.activemq.broker.BrokerService
BROKER_VERSION, DEFAULT_BROKER_NAME, DEFAULT_MAX_FILE_LENGTH, DEFAULT_PORT, destinationFactory, LOCAL_HOST_NAME
 
Constructor Summary
SslBrokerService()
           
 
Method Summary
 TransportConnector addSslConnector(String bindAddress, KeyManager[] km, TrustManager[] tm, SecureRandom random)
          Adds a new transport connector for the given bind address.
 TransportConnector addSslConnector(URI bindAddress, KeyManager[] km, TrustManager[] tm, SecureRandom random)
          Adds a new transport connector for the given bind address.
protected  TransportServer createSslTransportServer(URI brokerURI, KeyManager[] km, TrustManager[] tm, 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, addShutdownHook, autoStart, checkQueueSize, checkSystemUsageLimits, configureService, configureServices, containerShutdown, createBroker, createBrokerObjectName, createDefaultDestinationInterceptor, createDuplexNetworkConnectorObjectName, createNetworkConnectorObjectName, createPersistenceAdapter, createRegionBroker, createRegionBroker, createTransportConnector, deleteAllMessages, getAdminConnectionContext, getAdminView, getBroker, getBrokerContext, getBrokerDataDirectory, getBrokerName, getBrokerObjectName, getConnectorByName, getConsumerSystemUsage, getConsumerSystemUsagePortion, getDataDirectoryFile, getDefaultSocketURIString, getDestination, getDestinationInterceptors, getDestinationPolicy, getDestinations, getExecutor, getIoExceptionHandler, getJmsBridgeConnectors, getJobSchedulerStore, getManagementContext, getMaxPurgedDestinationsPerSweep, getMbeanInvocationTimeout, getMessageAuthorizationPolicy, getNetworkConnectorByName, getNetworkConnectors, getNetworkConnectorURIs, getOfflineDurableSubscriberTaskSchedule, getOfflineDurableSubscriberTimeout, getPersistenceAdapter, getPersistenceFactory, getPersistenceTaskRunnerFactory, getPersistenceThreadPriority, getPlugins, getPort, getProducerSystemUsage, getProducerSystemUsagePortion, getProxyConnectors, getRegionBroker, getSchedulePeriodForDestinationPurge, getScheduler, getSchedulerDirectoryFile, getServices, getSslContext, getStartException, getSystemExitOnShutdownExitCode, getSystemUsage, getTaskRunnerFactory, getTaskRunnerPriority, getTempDataStore, getTimeBeforePurgeTempDestinations, getTmpDataDirectory, getTransportConnectorByName, getTransportConnectorByScheme, getTransportConnectors, getTransportConnectorURIs, getTransportConnectorURIsAsMap, getUptime, getVmConnectorURI, getWaitForSlaveTimeout, handleIOException, isAdvisorySupport, isAllowTempAutoCreationOnSend, isCacheTempDestinations, isDedicatedTaskRunner, isDeleteAllMessagesOnStartup, isEnableStatistics, isKeepDurableSubsActive, isMonitorConnectionSplits, isNetworkConnectorStartAsync, isPassiveSlave, isPersistent, isPopulateJMSXUserID, isPopulateUserNameInMBeans, isSchedulerSupport, isShutdownOnMasterFailure, isShutdownOnSlaveFailure, isSplitSystemUsageForProducersConsumers, isStartAsync, isStarted, isSupportFailOver, isSystemExitOnShutdown, isUseAuthenticatedPrincipalForJMSXUserID, isUseJmx, isUseLocalHostBrokerName, isUseLoggingForShutdownErrors, isUseMirroredQueues, isUseShutdownHook, isUseTempMirroredQueues, isUseVirtualTopics, isWaitForSlave, logError, masterFailed, processHelperProperties, registerConnectorMBean, registerJmsConnectorMBean, registerNetworkConnectorMBean, registerPersistenceAdapterMBean, registerProxyConnectorMBean, removeConnector, removeDestination, removeJmsConnector, removeNetworkConnector, removeService, removeShutdownHook, removeShutdownHook, setAdminView, setAdvisorySupport, setAllowTempAutoCreationOnSend, setBrokerContext, setBrokerId, setBrokerName, setBrokerObjectName, setCacheTempDestinations, setConsumerSystemUsage, setConsumerSystemUsagePortion, setDataDirectory, setDataDirectoryFile, setDedicatedTaskRunner, setDeleteAllMessagesOnStartup, setDestinationFactory, setDestinationInterceptors, setDestinationPolicy, setDestinations, setEnableStatistics, setIoExceptionHandler, setJmsBridgeConnectors, setJobSchedulerStore, setKeepDurableSubsActive, setManagementContext, setMaxPurgedDestinationsPerSweep, setMbeanInvocationTimeout, setMessageAuthorizationPolicy, setMonitorConnectionSplits, setNetworkConnectors, setNetworkConnectorStartAsync, setNetworkConnectorURIs, setOfflineDurableSubscriberTaskSchedule, setOfflineDurableSubscriberTimeout, setPassiveSlave, setPersistenceAdapter, setPersistenceFactory, setPersistenceTaskRunnerFactory, setPersistenceThreadPriority, setPersistent, setPlugins, setPopulateJMSXUserID, setPopulateUserNameInMBeans, setProducerSystemUsage, setProducerSystemUsagePortion, setProxyConnectors, setRegionBroker, setSchedulePeriodForDestinationPurge, setSchedulerDirectory, setSchedulerDirectoryFile, setSchedulerSupport, setServices, setShutdownHooks, setShutdownOnMasterFailure, setShutdownOnSlaveFailure, setSplitSystemUsageForProducersConsumers, setSslContext, setStartAsync, setSupportFailOver, setSystemExitOnShutdown, setSystemExitOnShutdownExitCode, setSystemUsage, setTaskRunnerFactory, setTaskRunnerPriority, setTempDataStore, setTimeBeforePurgeTempDestinations, setTmpDataDirectory, setTransportConnectors, setTransportConnectorURIs, setUseAuthenticatedPrincipalForJMSXUserID, setUseJmx, setUseLocalHostBrokerName, setUseLoggingForShutdownErrors, setUseMirroredQueues, setUseShutdownHook, setUseTempMirroredQueues, setUseVirtualTopics, setVmConnectorURI, setWaitForSlave, setWaitForSlaveTimeout, shouldAutostart, shouldRecordVirtualDestination, start, start, startAllConnectors, startDestinations, startManagementContext, startTransportConnector, startVirtualConsumerDestinations, stop, stopAllConnectors, stopGracefully, toString, unregisterConnectorMBean, unregisterNetworkConnectorMBean, unregisterPersistenceAdapterMBean, waitUntilStarted, waitUntilStopped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SslBrokerService

public SslBrokerService()
Method Detail

addSslConnector

public TransportConnector addSslConnector(String bindAddress,
                                          KeyManager[] km,
                                          TrustManager[] tm,
                                          SecureRandom random)
                                   throws 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:
Exception

addSslConnector

public TransportConnector addSslConnector(URI bindAddress,
                                          KeyManager[] km,
                                          TrustManager[] tm,
                                          SecureRandom random)
                                   throws 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:
Exception

createSslTransportServer

protected TransportServer createSslTransportServer(URI brokerURI,
                                                   KeyManager[] km,
                                                   TrustManager[] tm,
                                                   SecureRandom random)
                                            throws IOException,
                                                   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:
IOException - If cannot handle URI.
KeyManagementException - Passed on from SSL.


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.