org.apache.activemq.broker.jmx
Interface DestinationViewMBean

All Known Subinterfaces:
QueueViewMBean, TopicViewMBean
All Known Implementing Classes:
DestinationView, QueueView, TopicView

public interface DestinationViewMBean


Method Summary
 javax.management.openmbean.CompositeData[] browse()
           
 javax.management.openmbean.CompositeData[] browse(java.lang.String selector)
           
 javax.management.openmbean.TabularData browseAsTable()
           
 javax.management.openmbean.TabularData browseAsTable(java.lang.String selector)
           
 java.util.List browseMessages()
          Browses the current destination returning a list of messages
 java.util.List browseMessages(java.lang.String selector)
          Browses the current destination with the given selector returning a list of messages
 long getConsumerCount()
           
 long getDequeueCount()
           
 long getDispatchCount()
           
 long getEnqueueCount()
           
 long getMemoryLimit()
           
 int getMemoryPercentageUsed()
           
 java.lang.String getName()
          Returns the name of this destination
 long getQueueSize()
           
 void resetStatistics()
          Resets the managment counters.
 java.lang.String sendTextMessage(java.util.Map headers, java.lang.String body)
          Sends a TextMesage to the destination.
 java.lang.String sendTextMessage(java.lang.String body)
          Sends a TextMesage to the destination.
 void setMemoryLimit(long limit)
           
 

Method Detail

getName

java.lang.String getName()
Returns the name of this destination


resetStatistics

void resetStatistics()
Resets the managment counters.


getEnqueueCount

long getEnqueueCount()
Returns:
The number of messages that have been sent to the destination.

getDispatchCount

long getDispatchCount()
Returns:
The number of messages that have been delivered (potentially not acknowledged) to consumers.

getDequeueCount

long getDequeueCount()
Returns:
The number of messages that have been acknowledged from the destination.

getConsumerCount

long getConsumerCount()
Returns:
The number of consmers subscribed to messages from this destination.

getQueueSize

long getQueueSize()
Returns:
The number of messages being buffered by this destination

browse

javax.management.openmbean.CompositeData[] browse()
                                                  throws javax.management.openmbean.OpenDataException
Returns:
An array of all the messages in the destination's queue.
Throws:
javax.management.openmbean.OpenDataException

browseAsTable

javax.management.openmbean.TabularData browseAsTable()
                                                     throws javax.management.openmbean.OpenDataException
Returns:
A list of all the messages in the destination's queue.
Throws:
javax.management.openmbean.OpenDataException

browse

javax.management.openmbean.CompositeData[] browse(java.lang.String selector)
                                                  throws javax.management.openmbean.OpenDataException,
                                                         javax.jms.InvalidSelectorException
Returns:
An array of all the messages in the destination's queue.
Throws:
javax.jms.InvalidSelectorException
javax.management.openmbean.OpenDataException

browseAsTable

javax.management.openmbean.TabularData browseAsTable(java.lang.String selector)
                                                     throws javax.management.openmbean.OpenDataException,
                                                            javax.jms.InvalidSelectorException
Returns:
A list of all the messages in the destination's queue.
Throws:
javax.jms.InvalidSelectorException
javax.management.openmbean.OpenDataException

sendTextMessage

java.lang.String sendTextMessage(java.lang.String body)
                                 throws java.lang.Exception
Sends a TextMesage to the destination.

Parameters:
body - the text to send
Returns:
the message id of the message sent.
Throws:
java.lang.Exception

sendTextMessage

java.lang.String sendTextMessage(java.util.Map headers,
                                 java.lang.String body)
                                 throws java.lang.Exception
Sends a TextMesage to the destination.

Parameters:
headers - the message headers and properties to set. Can only container Strings maped to primitive types.
body - the text to send
Returns:
the message id of the message sent.
Throws:
java.lang.Exception

getMemoryPercentageUsed

int getMemoryPercentageUsed()

getMemoryLimit

long getMemoryLimit()

setMemoryLimit

void setMemoryLimit(long limit)

browseMessages

java.util.List browseMessages()
                              throws javax.jms.InvalidSelectorException
Browses the current destination returning a list of messages

Throws:
javax.jms.InvalidSelectorException

browseMessages

java.util.List browseMessages(java.lang.String selector)
                              throws javax.jms.InvalidSelectorException
Browses the current destination with the given selector returning a list of messages

Throws:
javax.jms.InvalidSelectorException


Copyright © 2011 Apache Software Foundation. All Rights Reserved.