Package org.apache.activemq.plugin
Class StatisticsBroker
- java.lang.Object
-
- org.apache.activemq.broker.BrokerFilter
-
- org.apache.activemq.plugin.StatisticsBroker
-
public class StatisticsBroker extends BrokerFilter
A StatisticsBroker You can retrieve a Map Message for a Destination - or Broker containing statistics as key-value pairs The message must contain a replyTo Destination - else its ignored
-
-
Field Summary
Fields Modifier and Type Field Description protected ProducerIdadvisoryProducerIdprotected BrokerViewMBeanbrokerView-
Fields inherited from class org.apache.activemq.broker.BrokerFilter
next
-
-
Constructor Summary
Constructors Constructor Description StatisticsBroker(Broker next)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ActiveMQMapMessageprepareSubscriptionMessage(SubscriptionViewMBean subscriber)voidsend(ProducerBrokerExchange producerExchange, Message messageSend)Sets the persistence modeprotected voidsendStats(ConnectionContext context, ActiveMQMapMessage msg, ActiveMQDestination replyTo)protected voidsendSubStats(ConnectionContext context, ObjectName[] subscribers, ActiveMQDestination replyTo)voidstart()voidstop()-
Methods inherited from class org.apache.activemq.broker.BrokerFilter
acknowledge, addBroker, addConnection, addConsumer, addDestination, addDestinationInfo, addProducer, addSession, beginTransaction, brokerServiceStarted, commitTransaction, fastProducer, forgetTransaction, gc, getAdaptor, getAdminConnectionContext, getBrokerId, getBrokerName, getBrokerSequenceId, getBrokerService, getClients, getDestinationMap, getDestinationMap, getDestinations, getDestinations, getDurableDestinations, getExecutor, getNext, getPeerBrokerInfos, getPreparedTransactions, getRoot, getScheduler, getTempDataStore, getVmConnectorURI, isExpired, isFaultTolerantConfiguration, isFull, isStopped, messageConsumed, messageDelivered, messageDiscarded, messageExpired, messagePull, networkBridgeStarted, networkBridgeStopped, nowMasterBroker, postProcessDispatch, prepareTransaction, preProcessDispatch, processConsumerControl, processDispatchNotification, reapplyInterceptor, removeBroker, removeConnection, removeConsumer, removeDestination, removeDestinationInfo, removeProducer, removeSession, removeSubscription, rollbackTransaction, sendToDeadLetterQueue, setAdminConnectionContext, slowConsumer, virtualDestinationAdded, virtualDestinationRemoved
-
-
-
-
Field Detail
-
advisoryProducerId
protected final ProducerId advisoryProducerId
-
brokerView
protected BrokerViewMBean brokerView
-
-
Constructor Detail
-
StatisticsBroker
public StatisticsBroker(Broker next)
Constructor- Parameters:
next-
-
-
Method Detail
-
send
public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception
Sets the persistence mode- Specified by:
sendin interfaceRegion- Overrides:
sendin classBrokerFilter- Parameters:
producerExchange- the environment the operation is being executed under.- Throws:
Exception- TODO- See Also:
BrokerFilter.send(org.apache.activemq.broker.ProducerBrokerExchange, org.apache.activemq.command.Message)
-
start
public void start() throws Exception- Specified by:
startin interfaceService- Overrides:
startin classBrokerFilter- Throws:
Exception
-
stop
public void stop() throws Exception- Specified by:
stopin interfaceService- Overrides:
stopin classBrokerFilter- Throws:
Exception
-
sendSubStats
protected void sendSubStats(ConnectionContext context, ObjectName[] subscribers, ActiveMQDestination replyTo) throws Exception
- Throws:
Exception
-
prepareSubscriptionMessage
protected ActiveMQMapMessage prepareSubscriptionMessage(SubscriptionViewMBean subscriber) throws JMSException
- Throws:
JMSException
-
sendStats
protected void sendStats(ConnectionContext context, ActiveMQMapMessage msg, ActiveMQDestination replyTo) throws Exception
- Throws:
Exception
-
-