org.apache.activemq.broker.jmx
Class ManagedRegionBroker

java.lang.Object
  extended by org.apache.activemq.broker.EmptyBroker
      extended by org.apache.activemq.broker.region.RegionBroker
          extended by org.apache.activemq.broker.jmx.ManagedRegionBroker
All Implemented Interfaces:
Broker, Region, Service

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
ManagedRegionBroker(BrokerService brokerService, ManagementContext context, ObjectName brokerObjectName, TaskRunnerFactory taskRunnerFactory, SystemUsage memoryManager, DestinationFactory destinationFactory, DestinationInterceptor destinationInterceptor, Scheduler scheduler, ThreadPoolExecutor executor)
           
 
Method Summary
 Subscription addConsumer(ConnectionContext context, ConsumerInfo info)
          Adds a consumer.
protected  void addInactiveSubscription(SubscriptionKey key, SubscriptionInfo info, Subscription subscription)
           
 void addProducer(ConnectionContext context, ProducerInfo info)
          Adds a producer.
 CompositeData[] browse(SubscriptionView view)
           
 TabularData browseAsTable(SubscriptionView view)
           
protected  void buildExistingSubscriptions()
           
protected  Region createQueueRegion(SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory)
           
protected  Region createTempQueueRegion(SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory)
           
protected  Region createTempTopicRegion(SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory)
           
protected  Region createTopicRegion(SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory)
           
protected  void doStop(ServiceStopper stopper)
           
 Broker getContextBroker()
           
protected  ObjectName[] getDurableTopicSubscribers()
           
protected  ObjectName[] getDynamicDestinationProducers()
           
protected  ObjectName[] getInactiveDurableTopicSubscribers()
           
protected  ObjectName[] getQueueProducers()
           
protected  ObjectName[] getQueues()
           
protected  ObjectName[] getQueueSubscribers()
           
 Map<ObjectName,DestinationView> getQueueViews()
           
 Subscription getSubscriber(ObjectName key)
           
protected  List<Message> getSubscriberMessages(SubscriptionView view)
           
 ObjectName getSubscriberObjectName(Subscription key)
           
protected  ObjectName[] getTemporaryQueueProducers()
           
protected  ObjectName[] getTemporaryQueues()
           
protected  ObjectName[] getTemporaryQueueSubscribers()
           
protected  ObjectName[] getTemporaryTopicProducers()
           
protected  ObjectName[] getTemporaryTopics()
           
protected  ObjectName[] getTemporaryTopicSubscribers()
           
protected  ObjectName[] getTopicProducers()
           
protected  ObjectName[] getTopics()
           
protected  ObjectName[] getTopicSubscribers()
           
 void register(ActiveMQDestination destName, Destination destination)
           
protected  void registerDestination(ObjectName key, ActiveMQDestination dest, DestinationView view)
           
protected  void registerProducer(ObjectName key, ActiveMQDestination dest, ProducerView view)
           
 void registerRecoveredTransactionMBean(XATransaction transaction)
           
 ObjectName registerSlowConsumerStrategy(AbortSlowConsumerStrategy strategy)
           
 ObjectName registerSubscription(ConnectionContext context, Subscription sub)
           
protected  void registerSubscription(ObjectName key, ConsumerInfo info, SubscriptionKey subscriptionKey, SubscriptionView view)
           
 void removeConsumer(ConnectionContext context, ConsumerInfo info)
          Removes a consumer.
 void removeProducer(ConnectionContext context, ProducerInfo info)
          Removes a producer.
 void send(ProducerBrokerExchange exchange, Message message)
          Send a message to the broker to using the specified destination.
 void setContextBroker(Broker contextBroker)
           
 void start()
           
 void unregister(ActiveMQDestination destName)
           
 void unregister(XATransaction transaction)
           
protected  void unregisterDestination(ObjectName key)
           
protected  void unregisterProducer(ObjectName key)
           
protected  void unregisterSubscription(ObjectName key, boolean addToInactive)
           
 void unregisterSubscription(Subscription sub)
           
 
Methods inherited from class org.apache.activemq.broker.region.RegionBroker
acknowledge, addBroker, addBrokerInClusterUpdate, addConnection, addDestination, addDestinationInfo, beginTransaction, brokerServiceStarted, commitTransaction, createUnknownDestinationTypeException, forgetTransaction, gc, getAdaptor, getAdminConnectionContext, getBrokerId, getBrokerName, getBrokerSequenceId, getBrokerService, getClients, getConnectionStates, getDestinationInterceptor, 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, removeBroker, removeBrokerInClusterUpdate, removeConnection, removeDestination, removeDestinationInfo, removeSubscription, rollbackTransaction, sendToDeadLetterQueue, setAdminConnectionContext, setAllowTempAutoCreationOnSend, setBrokerId, setBrokerName, setKeepDurableSubsActive, stop
 
Methods inherited from class org.apache.activemq.broker.EmptyBroker
addSession, fastProducer, isFaultTolerantConfiguration, isFull, messageConsumed, messageDelivered, messageDiscarded, networkBridgeStarted, networkBridgeStopped, nowMasterBroker, removeSession, slowConsumer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface Service
Overrides:
start in class RegionBroker
Throws:
Exception

doStop

protected void doStop(ServiceStopper stopper)
Overrides:
doStop in class RegionBroker

createQueueRegion

protected Region createQueueRegion(SystemUsage memoryManager,
                                   TaskRunnerFactory taskRunnerFactory,
                                   DestinationFactory destinationFactory)
Overrides:
createQueueRegion in class RegionBroker

createTempQueueRegion

protected Region createTempQueueRegion(SystemUsage memoryManager,
                                       TaskRunnerFactory taskRunnerFactory,
                                       DestinationFactory destinationFactory)
Overrides:
createTempQueueRegion in class RegionBroker

createTempTopicRegion

protected Region createTempTopicRegion(SystemUsage memoryManager,
                                       TaskRunnerFactory taskRunnerFactory,
                                       DestinationFactory destinationFactory)
Overrides:
createTempTopicRegion in class RegionBroker

createTopicRegion

protected Region createTopicRegion(SystemUsage memoryManager,
                                   TaskRunnerFactory taskRunnerFactory,
                                   DestinationFactory destinationFactory)
Overrides:
createTopicRegion in class RegionBroker

register

public void register(ActiveMQDestination destName,
                     Destination destination)

unregister

public void unregister(ActiveMQDestination destName)

registerSubscription

public ObjectName registerSubscription(ConnectionContext context,
                                       Subscription sub)

addConsumer

public Subscription addConsumer(ConnectionContext context,
                                ConsumerInfo info)
                         throws Exception
Description copied from interface: Region
Adds a consumer.

Specified by:
addConsumer in interface Region
Overrides:
addConsumer in class RegionBroker
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 interface Region
Overrides:
removeConsumer in class RegionBroker
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 interface Broker
Specified by:
addProducer in interface Region
Overrides:
addProducer in class RegionBroker
Parameters:
context - the enviorment 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 interface Broker
Specified by:
removeProducer in interface Region
Overrides:
removeProducer in class RegionBroker
Parameters:
context - the enviorment 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 interface Region
Overrides:
send in class RegionBroker
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

getSubscriberMessages

protected List<Message> getSubscriberMessages(SubscriptionView view)

getTopics

protected ObjectName[] getTopics()

getQueues

protected ObjectName[] getQueues()

getTemporaryTopics

protected ObjectName[] getTemporaryTopics()

getTemporaryQueues

protected ObjectName[] getTemporaryQueues()

getTopicSubscribers

protected ObjectName[] getTopicSubscribers()

getDurableTopicSubscribers

protected ObjectName[] getDurableTopicSubscribers()

getQueueSubscribers

protected ObjectName[] getQueueSubscribers()

getTemporaryTopicSubscribers

protected ObjectName[] getTemporaryTopicSubscribers()

getTemporaryQueueSubscribers

protected ObjectName[] getTemporaryQueueSubscribers()

getInactiveDurableTopicSubscribers

protected ObjectName[] getInactiveDurableTopicSubscribers()

getTopicProducers

protected ObjectName[] getTopicProducers()

getQueueProducers

protected ObjectName[] getQueueProducers()

getTemporaryTopicProducers

protected ObjectName[] getTemporaryTopicProducers()

getTemporaryQueueProducers

protected ObjectName[] getTemporaryQueueProducers()

getDynamicDestinationProducers

protected ObjectName[] getDynamicDestinationProducers()

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()


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