Package org.apache.activemq.broker
Class SslBrokerService
- java.lang.Object
-
- org.apache.activemq.broker.BrokerService
-
- 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, DEFAULT_START_TIMEOUT, destinationFactory, LOCAL_HOST_NAME, MAX_SCHEDULER_REPEAT_ALLOWED
-
-
Constructor Summary
Constructors Constructor Description SslBrokerService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, addPreShutdownHook, addProxyConnector, addProxyConnector, addProxyConnector, addService, addShutdownHook, addShutdownHook, autoStart, checkMemorySystemUsageLimits, checkQueueSize, checkStoreSystemUsageLimits, checkStoreUsageLimits, checkTmpStoreUsageLimits, checkUsageLimit, configureService, configureServices, containerShutdown, createBroker, createBrokerObjectName, createDefaultDestinationInterceptor, createDuplexNetworkConnectorObjectName, createNetworkConnectorObjectName, createPersistenceAdapter, createRegionBroker, createRegionBroker, createTransportConnector, decrementCurrentConnections, deleteAllMessages, getAdminConnectionContext, getAdminView, getBroker, getBrokerContext, getBrokerDataDirectory, getBrokerName, getBrokerObjectName, getConnectorByName, getConsumerSystemUsage, getConsumerSystemUsagePortion, getCurrentConnections, getDataDirectoryFile, getDefaultSocketURIString, getDestination, getDestinationInterceptors, getDestinationPolicy, getDestinations, getDiskUsageCheckRegrowThreshold, getExecutor, getIoExceptionHandler, getJmsBridgeConnectors, getJobSchedulerStore, getManagementContext, getMaxPurgedDestinationsPerSweep, getMaxSchedulerRepeatAllowed, getMbeanInvocationTimeout, getMessageAuthorizationPolicy, getNetworkConnectorByName, getNetworkConnectors, getNetworkConnectorURIs, getOfflineDurableSubscriberTaskSchedule, getOfflineDurableSubscriberTimeout, getPersistenceAdapter, getPersistenceFactory, getPersistenceTaskRunnerFactory, getPersistenceThreadPriority, getPlugins, getPort, getProducerBrokerExchange, getProducerSystemUsage, getProducerSystemUsagePortion, getProxyConnectors, getRegionBroker, getSchedulePeriodForDestinationPurge, getScheduler, getSchedulerDirectoryFile, getServices, getSslContext, getStartException, getStoreOpenWireVersion, getSystemExitOnShutdownExitCode, getSystemUsage, getTaskRunnerFactory, getTaskRunnerPriority, getTempDataStore, getTimeBeforePurgeTempDestinations, getTmpDataDirectory, getTotalConnections, getTransportConnectorByName, getTransportConnectorByScheme, getTransportConnectors, getTransportConnectorURIs, getTransportConnectorURIsAsMap, getUptime, getUptimeMillis, getVmConnectorURI, getWaitForSlaveTimeout, handleIOException, incrementCurrentConnections, incrementTotalConnections, isAdjustUsageLimits, isAdvisorySupport, isAllowTempAutoCreationOnSend, isAnonymousProducerAdvisorySupport, isCacheTempDestinations, isDedicatedTaskRunner, isDeleteAllMessagesOnStartup, isEnableMessageExpirationOnActiveDurableSubs, isEnableStatistics, isKeepDurableSubsActive, isMonitorConnectionSplits, isNetworkConnectorStartAsync, isPassiveSlave, isPersistent, isPopulateJMSXUserID, isPopulateUserNameInMBeans, isRejectDurableConsumers, isRestartAllowed, isRestartRequested, isRollbackOnlyOnAsyncException, isSchedulerSupport, isShutdownOnMasterFailure, isShutdownOnSlaveFailure, isSlave, isSplitSystemUsageForProducersConsumers, isStartAsync, isStarted, isStopped, isStopping, isSystemExitOnShutdown, isUseAuthenticatedPrincipalForJMSXUserID, isUseJmx, isUseLocalHostBrokerName, isUseLoggingForShutdownErrors, isUseMirroredQueues, isUseShutdownHook, isUseTempMirroredQueues, isUseVirtualDestSubs, isUseVirtualDestSubsOnCreation, isUseVirtualTopics, isWaitForSlave, logError, masterFailed, processHelperProperties, registerConnectorMBean, registerJmsConnectorMBean, registerNetworkConnectorMBean, registerPersistenceAdapterMBean, registerProxyConnectorMBean, removeConnector, removeDestination, removeJmsConnector, removeNetworkConnector, removePreShutdownHook, removeService, removeShutdownHook, removeShutdownHook, requestRestart, scheduleDiskUsageLimitsCheck, setAdjustUsageLimits, setAdminView, setAdvisorySupport, setAllowTempAutoCreationOnSend, setAnonymousProducerAdvisorySupport, setBrokerContext, setBrokerId, setBrokerName, setBrokerObjectName, setCacheTempDestinations, setConsumerSystemUsage, setConsumerSystemUsagePortion, setDataDirectory, setDataDirectoryFile, setDedicatedTaskRunner, setDeleteAllMessagesOnStartup, setDestinationFactory, setDestinationInterceptors, setDestinationPolicy, setDestinations, setDiskUsageCheckRegrowThreshold, setEnableMessageExpirationOnActiveDurableSubs, setEnableStatistics, setIoExceptionHandler, setJmsBridgeConnectors, setJobSchedulerStore, setKeepDurableSubsActive, setManagementContext, setMaxPurgedDestinationsPerSweep, setMaxSchedulerRepeatAllowed, setMbeanInvocationTimeout, setMessageAuthorizationPolicy, setMonitorConnectionSplits, setNetworkConnectors, setNetworkConnectorStartAsync, setNetworkConnectorURIs, setOfflineDurableSubscriberTaskSchedule, setOfflineDurableSubscriberTimeout, setPassiveSlave, setPersistenceAdapter, setPersistenceFactory, setPersistenceTaskRunnerFactory, setPersistenceThreadPriority, setPersistent, setPlugins, setPopulateJMSXUserID, setPopulateUserNameInMBeans, setProducerSystemUsage, setProducerSystemUsagePortion, setProxyConnectors, setRegionBroker, setRejectDurableConsumers, setRestartAllowed, setRollbackOnlyOnAsyncException, setSchedulePeriodForDestinationPurge, setSchedulePeriodForDiskUsageCheck, setSchedulerDirectory, setSchedulerDirectoryFile, setSchedulerSupport, setServices, setShutdownHooks, setShutdownOnMasterFailure, setShutdownOnSlaveFailure, setSplitSystemUsageForProducersConsumers, setSslContext, setStartAsync, setStoreOpenWireVersion, setSystemExitOnShutdown, setSystemExitOnShutdownExitCode, setSystemUsage, setTaskRunnerFactory, setTaskRunnerPriority, setTempDataStore, setTimeBeforePurgeTempDestinations, setTmpDataDirectory, setTransportConnectors, setTransportConnectorURIs, setUseAuthenticatedPrincipalForJMSXUserID, setUseJmx, setUseLocalHostBrokerName, setUseLoggingForShutdownErrors, setUseMirroredQueues, setUseShutdownHook, setUseTempMirroredQueues, setUseVirtualDestSubs, setUseVirtualDestSubsOnCreation, setUseVirtualTopics, setVmConnectorURI, setWaitForSlave, setWaitForSlaveTimeout, shouldAutostart, shouldRecordVirtualDestination, start, start, startAllConnectors, startDestinations, startManagementContext, startNetworkConnector, startNetworkConnector, startTransportConnector, startVirtualConsumerDestinations, stop, stopAllConnectors, stopGracefully, toString, unregisterConnectorMBean, unregisterNetworkConnectorMBean, unregisterPersistenceAdapterMBean, waitUntilStarted, waitUntilStarted, waitUntilStopped
-
-
-
-
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.
-
-