Package org.apache.activemq.broker.jmx
Class ManagedRegionBroker
- java.lang.Object
-
- org.apache.activemq.broker.EmptyBroker
-
- org.apache.activemq.broker.region.RegionBroker
-
- org.apache.activemq.broker.jmx.ManagedRegionBroker
-
public class ManagedRegionBroker extends RegionBroker
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.broker.region.RegionBroker
brokerService, connectionStates, destinationFactory, destinationStatistics, ORIGINAL_EXPIRATION
-
-
Constructor Summary
Constructors Constructor Description ManagedRegionBroker(BrokerService brokerService, ManagementContext context, ObjectName brokerObjectName, TaskRunnerFactory taskRunnerFactory, SystemUsage memoryManager, DestinationFactory destinationFactory, DestinationInterceptor destinationInterceptor, Scheduler scheduler, ThreadPoolExecutor executor)
-
Method Summary
-
Methods inherited from class org.apache.activemq.broker.region.RegionBroker
acknowledge, addBroker, addBrokerInClusterUpdate, addDestination, addDestinationInfo, beginTransaction, brokerServiceStarted, commitTransaction, createUnknownDestinationTypeException, forgetTransaction, gc, getAdminConnectionContext, getBrokerId, getBrokerName, getBrokerSequenceId, getBrokerService, getClients, getConnectionContext, getConnectionStates, getDestinationInterceptor, getDestinationMap, getDestinationMap, getDestinationPolicy, getDestinations, getDestinations, getDestinationStatistics, getDurableDestinations, getExecutor, getPeerBrokerInfos, getPreparedTransactions, getQueueRegion, getRegion, getRoot, getScheduler, getTempDataStore, getTempQueueRegion, getTempTopicRegion, getTopicRegion, getVmConnectorURI, isAllowTempAutoCreationOnSend, isEqual, isExpired, isKeepDurableSubsActive, isStopped, messageExpired, messagePull, postProcessDispatch, prepareTransaction, preProcessDispatch, processConsumerControl, processDispatchNotification, purgeInactiveDestinations, reapplyInterceptor, removeBroker, removeBrokerInClusterUpdate, removeDestination, removeDestinationInfo, removeSubscription, rollbackTransaction, sendToDeadLetterQueue, setAdminConnectionContext, setAllowTempAutoCreationOnSend, setBrokerId, setBrokerName, setKeepDurableSubsActive, stop
-
Methods inherited from class org.apache.activemq.broker.EmptyBroker
addSession, fastProducer, getAdaptor, isFaultTolerantConfiguration, isFull, messageConsumed, messageDelivered, messageDiscarded, networkBridgeStarted, networkBridgeStopped, nowMasterBroker, removeSession, slowConsumer, virtualDestinationAdded, virtualDestinationRemoved
-
-
-
-
Constructor Detail
-
ManagedRegionBroker
public ManagedRegionBroker(BrokerService brokerService, ManagementContext context, ObjectName brokerObjectName, TaskRunnerFactory taskRunnerFactory, SystemUsage memoryManager, DestinationFactory destinationFactory, DestinationInterceptor destinationInterceptor, Scheduler scheduler, ThreadPoolExecutor executor) throws IOException
- Throws:
IOException
-
-
Method Detail
-
start
public void start() throws Exception
- Specified by:
start
in interfaceService
- Overrides:
start
in classRegionBroker
- Throws:
Exception
-
doStop
protected void doStop(ServiceStopper stopper)
- Overrides:
doStop
in classRegionBroker
-
createQueueRegion
protected Region createQueueRegion(SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory)
- Overrides:
createQueueRegion
in classRegionBroker
-
createTempQueueRegion
protected Region createTempQueueRegion(SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory)
- Overrides:
createTempQueueRegion
in classRegionBroker
-
createTempTopicRegion
protected Region createTempTopicRegion(SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory)
- Overrides:
createTempTopicRegion
in classRegionBroker
-
createTopicRegion
protected Region createTopicRegion(SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory)
- Overrides:
createTopicRegion
in classRegionBroker
-
register
public void register(ActiveMQDestination destName, Destination destination)
-
unregister
public void unregister(ActiveMQDestination destName)
-
registerSubscription
public ObjectName registerSubscription(ConnectionContext context, Subscription sub)
-
addConnection
public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception
Description copied from interface:Broker
A client is establishing a connection with the broker.- Specified by:
addConnection
in interfaceBroker
- Overrides:
addConnection
in classRegionBroker
- Throws:
Exception
- TODO
-
removeConnection
public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception
Description copied from interface:Broker
A client is disconnecting from the broker.- Specified by:
removeConnection
in interfaceBroker
- Overrides:
removeConnection
in classRegionBroker
- Parameters:
context
- the environment the operation is being executed under.error
- null if the client requested the disconnect or the error that caused the client to disconnect.- Throws:
Exception
- TODO
-
addConsumer
public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception
Description copied from interface:Region
Adds a consumer.- Specified by:
addConsumer
in interfaceRegion
- Overrides:
addConsumer
in classRegionBroker
- Parameters:
context
- the environment the operation is being executed under.- Returns:
- TODO
- Throws:
Exception
- TODO
-
removeConsumer
public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception
Description copied from interface:Region
Removes a consumer.- Specified by:
removeConsumer
in interfaceRegion
- Overrides:
removeConsumer
in classRegionBroker
- Parameters:
context
- the environment the operation is being executed under.- Throws:
Exception
- TODO
-
addProducer
public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception
Description copied from interface:Broker
Adds a producer.- Specified by:
addProducer
in interfaceBroker
- Specified by:
addProducer
in interfaceRegion
- Overrides:
addProducer
in classRegionBroker
- Parameters:
context
- the environment the operation is being executed under.- Throws:
Exception
- TODO
-
removeProducer
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception
Description copied from interface:Broker
Removes a producer.- Specified by:
removeProducer
in interfaceBroker
- Specified by:
removeProducer
in interfaceRegion
- Overrides:
removeProducer
in classRegionBroker
- Parameters:
context
- the environment the operation is being executed under.- Throws:
Exception
- TODO
-
send
public void send(ProducerBrokerExchange exchange, Message message) throws Exception
Description copied from interface:Region
Send a message to the broker to using the specified destination. The destination specified in the message does not need to match the destination the message is sent to. This is handy in case the message is being sent to a dead letter destination.- Specified by:
send
in interfaceRegion
- Overrides:
send
in classRegionBroker
- Parameters:
exchange
- the environment the operation is being executed under.- Throws:
Exception
- TODO
-
unregisterSubscription
public void unregisterSubscription(Subscription sub)
-
registerDestination
protected void registerDestination(ObjectName key, ActiveMQDestination dest, DestinationView view) throws Exception
- Throws:
Exception
-
unregisterDestination
protected void unregisterDestination(ObjectName key) throws Exception
- Throws:
Exception
-
registerProducer
protected void registerProducer(ObjectName key, ActiveMQDestination dest, ProducerView view) throws Exception
- Throws:
Exception
-
unregisterProducer
protected void unregisterProducer(ObjectName key) throws Exception
- Throws:
Exception
-
registerSubscription
protected void registerSubscription(ObjectName key, ConsumerInfo info, SubscriptionKey subscriptionKey, SubscriptionView view) throws Exception
- Throws:
Exception
-
unregisterSubscription
protected void unregisterSubscription(ObjectName key, boolean addToInactive) throws Exception
- Throws:
Exception
-
buildExistingSubscriptions
protected void buildExistingSubscriptions() throws Exception
- Throws:
Exception
-
addInactiveSubscription
protected void addInactiveSubscription(SubscriptionKey key, SubscriptionInfo info, Subscription subscription)
-
browse
public CompositeData[] browse(SubscriptionView view) throws OpenDataException
- Throws:
OpenDataException
-
browseAsTable
public TabularData browseAsTable(SubscriptionView view) throws OpenDataException
- Throws:
OpenDataException
-
remove
public void remove(SubscriptionView view, String messageId) throws Exception
- Throws:
Exception
-
getSubscriberMessages
protected Message[] getSubscriberMessages(SubscriptionView view)
-
getTopics
protected ObjectName[] getTopics()
-
getTopicsNonSuppressed
protected ObjectName[] getTopicsNonSuppressed()
-
getQueues
protected ObjectName[] getQueues()
-
getQueuesNonSuppressed
protected ObjectName[] getQueuesNonSuppressed()
-
getTemporaryTopics
protected ObjectName[] getTemporaryTopics()
-
getTemporaryTopicsNonSuppressed
protected ObjectName[] getTemporaryTopicsNonSuppressed()
-
getTemporaryQueues
protected ObjectName[] getTemporaryQueues()
-
getTemporaryQueuesNonSuppressed
protected ObjectName[] getTemporaryQueuesNonSuppressed()
-
getTopicSubscribers
protected ObjectName[] getTopicSubscribers()
-
getTopicSubscribersNonSuppressed
protected ObjectName[] getTopicSubscribersNonSuppressed()
-
getDurableTopicSubscribers
protected ObjectName[] getDurableTopicSubscribers()
-
getDurableTopicSubscribersNonSuppressed
protected ObjectName[] getDurableTopicSubscribersNonSuppressed()
-
getQueueSubscribers
protected ObjectName[] getQueueSubscribers()
-
getQueueSubscribersNonSuppressed
protected ObjectName[] getQueueSubscribersNonSuppressed()
-
getTemporaryTopicSubscribers
protected ObjectName[] getTemporaryTopicSubscribers()
-
getTemporaryTopicSubscribersNonSuppressed
protected ObjectName[] getTemporaryTopicSubscribersNonSuppressed()
-
getTemporaryQueueSubscribers
protected ObjectName[] getTemporaryQueueSubscribers()
-
getTemporaryQueueSubscribersNonSuppressed
protected ObjectName[] getTemporaryQueueSubscribersNonSuppressed()
-
getInactiveDurableTopicSubscribers
protected ObjectName[] getInactiveDurableTopicSubscribers()
-
getInactiveDurableTopicSubscribersNonSuppressed
protected ObjectName[] getInactiveDurableTopicSubscribersNonSuppressed()
-
getTopicProducers
protected ObjectName[] getTopicProducers()
-
getTopicProducersNonSuppressed
protected ObjectName[] getTopicProducersNonSuppressed()
-
getQueueProducers
protected ObjectName[] getQueueProducers()
-
getQueueProducersNonSuppressed
protected ObjectName[] getQueueProducersNonSuppressed()
-
getTemporaryTopicProducers
protected ObjectName[] getTemporaryTopicProducers()
-
getTemporaryTopicProducersNonSuppressed
protected ObjectName[] getTemporaryTopicProducersNonSuppressed()
-
getTemporaryQueueProducers
protected ObjectName[] getTemporaryQueueProducers()
-
getTemporaryQueueProducersNonSuppressed
protected ObjectName[] getTemporaryQueueProducersNonSuppressed()
-
getDynamicDestinationProducers
protected ObjectName[] getDynamicDestinationProducers()
-
getDynamicDestinationProducersNonSuppressed
protected ObjectName[] getDynamicDestinationProducersNonSuppressed()
-
getContextBroker
public Broker getContextBroker()
-
setContextBroker
public void setContextBroker(Broker contextBroker)
-
registerSlowConsumerStrategy
public ObjectName registerSlowConsumerStrategy(AbortSlowConsumerStrategy strategy) throws MalformedObjectNameException
- Throws:
MalformedObjectNameException
-
registerRecoveredTransactionMBean
public void registerRecoveredTransactionMBean(XATransaction transaction)
-
unregister
public void unregister(XATransaction transaction)
-
getSubscriberObjectName
public ObjectName getSubscriberObjectName(Subscription key)
-
getSubscriber
public Subscription getSubscriber(ObjectName key)
-
getQueueViews
public Map<ObjectName,DestinationView> getQueueViews()
-
getTopicViews
public Map<ObjectName,DestinationView> getTopicViews()
-
getQueueView
public DestinationView getQueueView(String queueName) throws MalformedObjectNameException
- Throws:
MalformedObjectNameException
-
getRegisteredMbeans
public Set<ObjectName> getRegisteredMbeans()
-
-