org.apache.activemq.broker.jmx
Class BrokerView

java.lang.Object
  extended by org.apache.activemq.broker.jmx.BrokerView
All Implemented Interfaces:
BrokerViewMBean, Service

public class BrokerView
extends Object
implements BrokerViewMBean


Constructor Summary
BrokerView(BrokerService brokerService, ManagedRegionBroker managedBroker)
           
 
Method Summary
 String addConnector(String discoveryAddress)
           
 String addNetworkConnector(String discoveryAddress)
           
 void addQueue(String name)
          Adds a Queue destination to the broker.
 void addTopic(String name)
          Adds a Topic destination to the broker.
 ObjectName createDurableSubscriber(String clientId, String subscriberName, String topicName, String selector)
          Creates a new durable topic subscriber
 void destroyDurableSubscriber(String clientId, String subscriberName)
          Destroys a durable subscriber
 void disableStatistics()
           
 void enableStatistics()
           
 void gc()
          The Broker will flush it's caches so that the garbage collector can reclaim more memory.
 double getAverageMessageSize()
           
 ManagedRegionBroker getBroker()
           
 String getBrokerId()
           
 String getBrokerName()
           
 String getBrokerVersion()
           
 String getDataDirectory()
           
 ObjectName[] getDurableTopicSubscribers()
           
 ObjectName[] getDynamicDestinationProducers()
           
 ObjectName[] getInactiveDurableTopicSubscribers()
           
 ObjectName getJMSJobScheduler()
           
 long getJobSchedulerStoreLimit()
           
 int getJobSchedulerStorePercentUsage()
           
 long getMaxMessageSize()
           
 long getMemoryLimit()
           
 int getMemoryPercentUsage()
           
 long getMinMessageSize()
           
 String getOpenWireURL()
          Deprecated. 
 ObjectName[] getQueueProducers()
           
 ObjectName[] getQueues()
           
 ObjectName[] getQueueSubscribers()
           
 String getSslURL()
          Deprecated. 
 String getStompSslURL()
          Deprecated. 
 String getStompURL()
          Deprecated. 
 long getStoreLimit()
           
 int getStorePercentUsage()
           
 long getTempLimit()
           
 ObjectName[] getTemporaryQueueProducers()
           
 ObjectName[] getTemporaryQueues()
           
 ObjectName[] getTemporaryQueueSubscribers()
           
 ObjectName[] getTemporaryTopicProducers()
           
 ObjectName[] getTemporaryTopics()
           
 ObjectName[] getTemporaryTopicSubscribers()
           
 int getTempPercentUsage()
           
 ObjectName[] getTopicProducers()
           
 ObjectName[] getTopics()
           
 ObjectName[] getTopicSubscribers()
           
 long getTotalConsumerCount()
           
 long getTotalDequeueCount()
           
 long getTotalEnqueueCount()
           
 long getTotalMessageCount()
           
 long getTotalMessagesCached()
           
 long getTotalProducerCount()
           
 String getTransportConnectorByType(String type)
           
 Map<String,String> getTransportConnectors()
           
 String getUptime()
           
 String getVMURL()
           
 boolean isPersistent()
           
 boolean isSlave()
           
 boolean isStatisticsEnabled()
           
 void reloadLog4jProperties()
          Reloads log4j.properties from the classpath.
 boolean removeConnector(String connectorName)
           
 boolean removeNetworkConnector(String connectorName)
           
 void removeQueue(String name)
          Removes a Queue destination from the broker.
 void removeTopic(String name)
          Removes a Topic destination from the broker.
 void resetStatistics()
           
 void restart()
          Restart the broker and all it's components.
 void setBroker(ManagedRegionBroker broker)
           
 void setJMSJobScheduler(ObjectName name)
           
 void setJobSchedulerStoreLimit(long limit)
           
 void setMemoryLimit(long limit)
           
 void setStoreLimit(long limit)
           
 void setTempLimit(long limit)
           
 void start()
           
 void stop()
          Stop the broker and all it's components.
 void stopGracefully(String connectorName, String queueName, long timeout, long pollInterval)
           
 void terminateJVM(int exitCode)
          Shuts down the JVM.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrokerView

public BrokerView(BrokerService brokerService,
                  ManagedRegionBroker managedBroker)
           throws Exception
Throws:
Exception
Method Detail

getBroker

public ManagedRegionBroker getBroker()

setBroker

public void setBroker(ManagedRegionBroker broker)

getBrokerId

public String getBrokerId()
Specified by:
getBrokerId in interface BrokerViewMBean
Returns:
The unique id of the broker.

getBrokerName

public String getBrokerName()
Specified by:
getBrokerName in interface BrokerViewMBean
Returns:
The name of the broker.

getBrokerVersion

public String getBrokerVersion()
Specified by:
getBrokerVersion in interface BrokerViewMBean
Returns:
The name of the broker.

getUptime

public String getUptime()
Specified by:
getUptime in interface BrokerViewMBean
Returns:
Uptime of the broker.

gc

public void gc()
        throws Exception
Description copied from interface: BrokerViewMBean
The Broker will flush it's caches so that the garbage collector can reclaim more memory.

Specified by:
gc in interface BrokerViewMBean
Throws:
Exception

start

public void start()
           throws Exception
Specified by:
start in interface Service
Throws:
Exception

stop

public void stop()
          throws Exception
Description copied from interface: BrokerViewMBean
Stop the broker and all it's components.

Specified by:
stop in interface BrokerViewMBean
Specified by:
stop in interface Service
Throws:
Exception

restart

public void restart()
             throws Exception
Description copied from interface: BrokerViewMBean
Restart the broker and all it's components.

Specified by:
restart in interface BrokerViewMBean
Throws:
Exception

stopGracefully

public void stopGracefully(String connectorName,
                           String queueName,
                           long timeout,
                           long pollInterval)
                    throws Exception
Specified by:
stopGracefully in interface BrokerViewMBean
Throws:
Exception

getTotalEnqueueCount

public long getTotalEnqueueCount()
Specified by:
getTotalEnqueueCount in interface BrokerViewMBean

getTotalDequeueCount

public long getTotalDequeueCount()
Specified by:
getTotalDequeueCount in interface BrokerViewMBean

getTotalConsumerCount

public long getTotalConsumerCount()
Specified by:
getTotalConsumerCount in interface BrokerViewMBean

getTotalProducerCount

public long getTotalProducerCount()
Specified by:
getTotalProducerCount in interface BrokerViewMBean

getTotalMessageCount

public long getTotalMessageCount()
Specified by:
getTotalMessageCount in interface BrokerViewMBean

getAverageMessageSize

public double getAverageMessageSize()
Specified by:
getAverageMessageSize in interface BrokerViewMBean
Returns:
the average size of a message (bytes)

getMaxMessageSize

public long getMaxMessageSize()
Specified by:
getMaxMessageSize in interface BrokerViewMBean
Returns:
the max size of a message (bytes)

getMinMessageSize

public long getMinMessageSize()
Specified by:
getMinMessageSize in interface BrokerViewMBean
Returns:
the min size of a message (bytes)

getTotalMessagesCached

public long getTotalMessagesCached()

getMemoryPercentUsage

public int getMemoryPercentUsage()
Specified by:
getMemoryPercentUsage in interface BrokerViewMBean

getMemoryLimit

public long getMemoryLimit()
Specified by:
getMemoryLimit in interface BrokerViewMBean

setMemoryLimit

public void setMemoryLimit(long limit)
Specified by:
setMemoryLimit in interface BrokerViewMBean

getStoreLimit

public long getStoreLimit()
Specified by:
getStoreLimit in interface BrokerViewMBean

getStorePercentUsage

public int getStorePercentUsage()
Specified by:
getStorePercentUsage in interface BrokerViewMBean

getTempLimit

public long getTempLimit()
Specified by:
getTempLimit in interface BrokerViewMBean

getTempPercentUsage

public int getTempPercentUsage()
Specified by:
getTempPercentUsage in interface BrokerViewMBean

getJobSchedulerStoreLimit

public long getJobSchedulerStoreLimit()
Specified by:
getJobSchedulerStoreLimit in interface BrokerViewMBean

getJobSchedulerStorePercentUsage

public int getJobSchedulerStorePercentUsage()
Specified by:
getJobSchedulerStorePercentUsage in interface BrokerViewMBean

setStoreLimit

public void setStoreLimit(long limit)
Specified by:
setStoreLimit in interface BrokerViewMBean

setTempLimit

public void setTempLimit(long limit)
Specified by:
setTempLimit in interface BrokerViewMBean

setJobSchedulerStoreLimit

public void setJobSchedulerStoreLimit(long limit)
Specified by:
setJobSchedulerStoreLimit in interface BrokerViewMBean

resetStatistics

public void resetStatistics()
Specified by:
resetStatistics in interface BrokerViewMBean

enableStatistics

public void enableStatistics()
Specified by:
enableStatistics in interface BrokerViewMBean

disableStatistics

public void disableStatistics()
Specified by:
disableStatistics in interface BrokerViewMBean

isStatisticsEnabled

public boolean isStatisticsEnabled()
Specified by:
isStatisticsEnabled in interface BrokerViewMBean

isPersistent

public boolean isPersistent()
Specified by:
isPersistent in interface BrokerViewMBean

terminateJVM

public void terminateJVM(int exitCode)
Description copied from interface: BrokerViewMBean
Shuts down the JVM.

Specified by:
terminateJVM in interface BrokerViewMBean
Parameters:
exitCode - the exit code that will be reported by the JVM process when it exits.

getTopics

public ObjectName[] getTopics()
Specified by:
getTopics in interface BrokerViewMBean

getQueues

public ObjectName[] getQueues()
Specified by:
getQueues in interface BrokerViewMBean

getTemporaryTopics

public ObjectName[] getTemporaryTopics()
Specified by:
getTemporaryTopics in interface BrokerViewMBean

getTemporaryQueues

public ObjectName[] getTemporaryQueues()
Specified by:
getTemporaryQueues in interface BrokerViewMBean

getTopicSubscribers

public ObjectName[] getTopicSubscribers()
Specified by:
getTopicSubscribers in interface BrokerViewMBean

getDurableTopicSubscribers

public ObjectName[] getDurableTopicSubscribers()
Specified by:
getDurableTopicSubscribers in interface BrokerViewMBean

getQueueSubscribers

public ObjectName[] getQueueSubscribers()
Specified by:
getQueueSubscribers in interface BrokerViewMBean

getTemporaryTopicSubscribers

public ObjectName[] getTemporaryTopicSubscribers()
Specified by:
getTemporaryTopicSubscribers in interface BrokerViewMBean

getTemporaryQueueSubscribers

public ObjectName[] getTemporaryQueueSubscribers()
Specified by:
getTemporaryQueueSubscribers in interface BrokerViewMBean

getInactiveDurableTopicSubscribers

public ObjectName[] getInactiveDurableTopicSubscribers()
Specified by:
getInactiveDurableTopicSubscribers in interface BrokerViewMBean

getTopicProducers

public ObjectName[] getTopicProducers()
Specified by:
getTopicProducers in interface BrokerViewMBean

getQueueProducers

public ObjectName[] getQueueProducers()
Specified by:
getQueueProducers in interface BrokerViewMBean

getTemporaryTopicProducers

public ObjectName[] getTemporaryTopicProducers()
Specified by:
getTemporaryTopicProducers in interface BrokerViewMBean

getTemporaryQueueProducers

public ObjectName[] getTemporaryQueueProducers()
Specified by:
getTemporaryQueueProducers in interface BrokerViewMBean

getDynamicDestinationProducers

public ObjectName[] getDynamicDestinationProducers()
Specified by:
getDynamicDestinationProducers in interface BrokerViewMBean

addConnector

public String addConnector(String discoveryAddress)
                    throws Exception
Specified by:
addConnector in interface BrokerViewMBean
Throws:
Exception

addNetworkConnector

public String addNetworkConnector(String discoveryAddress)
                           throws Exception
Specified by:
addNetworkConnector in interface BrokerViewMBean
Throws:
Exception

removeConnector

public boolean removeConnector(String connectorName)
                        throws Exception
Specified by:
removeConnector in interface BrokerViewMBean
Throws:
Exception

removeNetworkConnector

public boolean removeNetworkConnector(String connectorName)
                               throws Exception
Specified by:
removeNetworkConnector in interface BrokerViewMBean
Throws:
Exception

addTopic

public void addTopic(String name)
              throws Exception
Description copied from interface: BrokerViewMBean
Adds a Topic destination to the broker.

Specified by:
addTopic in interface BrokerViewMBean
Parameters:
name - The name of the Topic
Throws:
Exception

addQueue

public void addQueue(String name)
              throws Exception
Description copied from interface: BrokerViewMBean
Adds a Queue destination to the broker.

Specified by:
addQueue in interface BrokerViewMBean
Parameters:
name - The name of the Queue
Throws:
Exception

removeTopic

public void removeTopic(String name)
                 throws Exception
Description copied from interface: BrokerViewMBean
Removes a Topic destination from the broker.

Specified by:
removeTopic in interface BrokerViewMBean
Parameters:
name - The name of the Topic
Throws:
Exception

removeQueue

public void removeQueue(String name)
                 throws Exception
Description copied from interface: BrokerViewMBean
Removes a Queue destination from the broker.

Specified by:
removeQueue in interface BrokerViewMBean
Parameters:
name - The name of the Queue
Throws:
Exception

createDurableSubscriber

public ObjectName createDurableSubscriber(String clientId,
                                          String subscriberName,
                                          String topicName,
                                          String selector)
                                   throws Exception
Description copied from interface: BrokerViewMBean
Creates a new durable topic subscriber

Specified by:
createDurableSubscriber in interface BrokerViewMBean
Parameters:
clientId - the JMS client ID
subscriberName - the durable subscriber name
topicName - the name of the topic to subscribe to
selector - a selector or null
Returns:
the object name of the MBean registered in JMX
Throws:
Exception

destroyDurableSubscriber

public void destroyDurableSubscriber(String clientId,
                                     String subscriberName)
                              throws Exception
Description copied from interface: BrokerViewMBean
Destroys a durable subscriber

Specified by:
destroyDurableSubscriber in interface BrokerViewMBean
Parameters:
clientId - the JMS client ID
subscriberName - the durable subscriber name
Throws:
Exception

reloadLog4jProperties

public void reloadLog4jProperties()
                           throws Throwable
Description copied from interface: BrokerViewMBean
Reloads log4j.properties from the classpath. This methods calls org.apache.activemq.transport.TransportLoggerControl.reloadLog4jProperties

Specified by:
reloadLog4jProperties in interface BrokerViewMBean
Throws:
Throwable

getTransportConnectors

public Map<String,String> getTransportConnectors()
Specified by:
getTransportConnectors in interface BrokerViewMBean

getTransportConnectorByType

public String getTransportConnectorByType(String type)
Specified by:
getTransportConnectorByType in interface BrokerViewMBean

getOpenWireURL

@Deprecated
public String getOpenWireURL()
Deprecated. 

Specified by:
getOpenWireURL in interface BrokerViewMBean

getStompURL

@Deprecated
public String getStompURL()
Deprecated. 

Specified by:
getStompURL in interface BrokerViewMBean

getSslURL

@Deprecated
public String getSslURL()
Deprecated. 

Specified by:
getSslURL in interface BrokerViewMBean

getStompSslURL

@Deprecated
public String getStompSslURL()
Deprecated. 

Specified by:
getStompSslURL in interface BrokerViewMBean

getVMURL

public String getVMURL()
Specified by:
getVMURL in interface BrokerViewMBean

getDataDirectory

public String getDataDirectory()
Specified by:
getDataDirectory in interface BrokerViewMBean

getJMSJobScheduler

public ObjectName getJMSJobScheduler()
Specified by:
getJMSJobScheduler in interface BrokerViewMBean

setJMSJobScheduler

public void setJMSJobScheduler(ObjectName name)

isSlave

public boolean isSlave()
Specified by:
isSlave in interface BrokerViewMBean


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.