org.apache.activemq.plugin
Class StatisticsBroker

java.lang.Object
  extended by org.apache.activemq.broker.BrokerFilter
      extended by org.apache.activemq.plugin.StatisticsBroker
All Implemented Interfaces:
Broker, Region, Service

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
protected  ProducerId advisoryProducerId
           
protected  BrokerViewMBean brokerView
           
 
Fields inherited from class org.apache.activemq.broker.BrokerFilter
next
 
Constructor Summary
StatisticsBroker(Broker next)
          Constructor
 
Method Summary
protected  ActiveMQMapMessage prepareSubscriptionMessage(SubscriptionViewMBean subscriber)
           
 void send(ProducerBrokerExchange producerExchange, Message messageSend)
          Sets the persistence mode
protected  void sendStats(ConnectionContext context, ActiveMQMapMessage msg, ActiveMQDestination replyTo)
           
protected  void sendSubStats(ConnectionContext context, ObjectName[] subscribers, ActiveMQDestination replyTo)
           
 void start()
           
 void stop()
           
 
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, getDestinations, getDestinations, getDurableDestinations, getExecutor, getPeerBrokerInfos, getPreparedTransactions, getRoot, getScheduler, getTempDataStore, getVmConnectorURI, isExpired, isFaultTolerantConfiguration, isFull, isStopped, messageConsumed, messageDelivered, messageDiscarded, messageExpired, messagePull, networkBridgeStarted, networkBridgeStopped, nowMasterBroker, postProcessDispatch, prepareTransaction, preProcessDispatch, processConsumerControl, processDispatchNotification, removeBroker, removeConnection, removeConsumer, removeDestination, removeDestinationInfo, removeProducer, removeSession, removeSubscription, rollbackTransaction, sendToDeadLetterQueue, setAdminConnectionContext, slowConsumer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

stop

public void stop()
          throws Exception
Specified by:
stop in interface Service
Overrides:
stop in class BrokerFilter
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


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