org.apache.activemq.broker.jmx
Interface DestinationViewMBean

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

public interface DestinationViewMBean


Method Summary
 CompositeData[] browse()
           
 CompositeData[] browse(String selector)
           
 TabularData browseAsTable()
           
 TabularData browseAsTable(String selector)
           
 List<?> browseMessages()
          Browses the current destination returning a list of messages
 List<?> browseMessages(String selector)
          Browses the current destination with the given selector returning a list of messages
 double getAverageEnqueueTime()
           
 long getBlockedProducerWarningInterval()
           
 long getConsumerCount()
          Returns the number of consumers subscribed this destination.
 long getDequeueCount()
          Returns the number of messages that have been acknowledged from the destination.
 long getDispatchCount()
          Returns the number of messages that have been delivered (potentially not acknowledged) to consumers.
 long getEnqueueCount()
          Returns the number of messages that have been sent to the destination.
 long getExpiredCount()
          Returns the number of messages that have expired
 long getInFlightCount()
          Returns the number of messages that have been dispatched but not acknowledged
 int getMaxAuditDepth()
           
 long getMaxEnqueueTime()
           
 int getMaxPageSize()
           
 int getMaxProducersToAudit()
           
 long getMemoryLimit()
           
 int getMemoryPercentUsage()
           
 long getMemoryUsageByteCount()
           
 float getMemoryUsagePortion()
           
 long getMinEnqueueTime()
           
 String getName()
          Returns the name of this destination
 String getOptions()
           
 long getProducerCount()
           
 long getQueueSize()
          Returns the number of messages in this destination which are yet to be consumed
 ObjectName getSlowConsumerStrategy()
          Returns the slow consumer strategy MBean for this destination
 ObjectName[] getSubscriptions()
          Returns all the current subscription MBeans matching this destination
 boolean isAlwaysRetroactive()
           
 boolean isPrioritizedMessages()
           
 boolean isProducerFlowControl()
           
 boolean isUseCache()
           
 void resetStatistics()
          Resets the managment counters.
 String sendTextMessage(Map<?,?> headers, String body)
          Sends a TextMesage to the destination.
 String sendTextMessage(Map<?,?> headers, String body, String user, String password)
           
 String sendTextMessage(String body)
          Sends a TextMesage to the destination.
 String sendTextMessage(String body, String user, String password)
          Sends a TextMesage to the destination.
 void setAlwaysRetroactive(boolean alwaysRetroactive)
           
 void setBlockedProducerWarningInterval(long blockedProducerWarningInterval)
          Set's the interval at which warnings about producers being blocked by resource usage will be triggered.
 void setMaxAuditDepth(int maxAuditDepth)
           
 void setMaxPageSize(int pageSize)
           
 void setMaxProducersToAudit(int maxProducersToAudit)
           
 void setMemoryLimit(long limit)
          set the amount of memory allocated to this destination
 void setMemoryUsagePortion(float value)
          set the portion of memory from the broker memory limit for this destination
 void setProducerFlowControl(boolean producerFlowControl)
           
 void setUseCache(boolean value)
           
 

Method Detail

getName

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.

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.

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.

Returns:
The number of messages that have been acknowledged from the destination.

getInFlightCount

long getInFlightCount()
Returns the number of messages that have been dispatched but not acknowledged

Returns:
The number of messages that have been dispatched but not acknowledged

getExpiredCount

long getExpiredCount()
Returns the number of messages that have expired

Returns:
The number of messages that have expired

getConsumerCount

long getConsumerCount()
Returns the number of consumers subscribed this destination.

Returns:
The number of consumers subscribed this destination.

getProducerCount

long getProducerCount()
Returns:
the number of producers publishing to the destination

getQueueSize

long getQueueSize()
Returns the number of messages in this destination which are yet to be consumed

Returns:
Returns the number of messages in this destination which are yet to be consumed

browse

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

browseAsTable

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

browse

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

browseAsTable

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

sendTextMessage

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

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

sendTextMessage

String sendTextMessage(Map<?,?> headers,
                       String body)
                       throws 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:
Exception

sendTextMessage

String sendTextMessage(String body,
                       String user,
                       String password)
                       throws Exception
Sends a TextMesage to the destination.

Parameters:
body - the text to send
user -
password -
Returns:
Throws:
Exception

sendTextMessage

String sendTextMessage(Map<?,?> headers,
                       String body,
                       String user,
                       String password)
                       throws Exception
Parameters:
headers - the message headers and properties to set. Can only container Strings maped to primitive types.
body - the text to send
user -
password -
Returns:
Throws:
Exception

getMemoryPercentUsage

int getMemoryPercentUsage()
Returns:
the percentage of amount of memory used

getMemoryUsageByteCount

long getMemoryUsageByteCount()
Returns:
the amount of memory currently used by this destination

getMemoryLimit

long getMemoryLimit()
Returns:
the amount of memory allocated to this destination

setMemoryLimit

void setMemoryLimit(long limit)
set the amount of memory allocated to this destination

Parameters:
limit -

getMemoryUsagePortion

float getMemoryUsagePortion()
Returns:
the portion of memory from the broker memory limit for this destination

setMemoryUsagePortion

void setMemoryUsagePortion(float value)
set the portion of memory from the broker memory limit for this destination

Parameters:
value -

browseMessages

List<?> browseMessages()
                       throws InvalidSelectorException
Browses the current destination returning a list of messages

Throws:
InvalidSelectorException

browseMessages

List<?> browseMessages(String selector)
                       throws InvalidSelectorException
Browses the current destination with the given selector returning a list of messages

Throws:
InvalidSelectorException

getMaxEnqueueTime

long getMaxEnqueueTime()
Returns:
longest time a message is held by a destination

getMinEnqueueTime

long getMinEnqueueTime()
Returns:
shortest time a message is held by a destination

getAverageEnqueueTime

double getAverageEnqueueTime()
Returns:
average time a message is held by a destination

isProducerFlowControl

boolean isProducerFlowControl()
Returns:
the producerFlowControl

setProducerFlowControl

void setProducerFlowControl(boolean producerFlowControl)
Parameters:
producerFlowControl - the producerFlowControl to set

isAlwaysRetroactive

boolean isAlwaysRetroactive()
Returns:
if we treat consumers as alwaysRetroactive

setAlwaysRetroactive

void setAlwaysRetroactive(boolean alwaysRetroactive)
Parameters:
alwaysRetroactive - set as always retroActive

setBlockedProducerWarningInterval

void setBlockedProducerWarningInterval(long blockedProducerWarningInterval)
Set's the interval at which warnings about producers being blocked by resource usage will be triggered. Values of 0 or less will disable warnings

Parameters:
blockedProducerWarningInterval - the interval at which warning about blocked producers will be triggered.

getBlockedProducerWarningInterval

long getBlockedProducerWarningInterval()
Returns:
the interval at which warning about blocked producers will be triggered.

getMaxProducersToAudit

int getMaxProducersToAudit()
Returns:
the maxProducersToAudit

setMaxProducersToAudit

void setMaxProducersToAudit(int maxProducersToAudit)
Parameters:
maxProducersToAudit - the maxProducersToAudit to set

getMaxAuditDepth

int getMaxAuditDepth()
Returns:
the maxAuditDepth

setMaxAuditDepth

void setMaxAuditDepth(int maxAuditDepth)
Parameters:
maxAuditDepth - the maxAuditDepth to set

getMaxPageSize

int getMaxPageSize()
Returns:
the maximum number of message to be paged into the destination

setMaxPageSize

void setMaxPageSize(int pageSize)
Parameters:
pageSize - Set the maximum number of messages to page into the destination

isUseCache

boolean isUseCache()
Returns:
true if caching is allowed of for the destination

isPrioritizedMessages

boolean isPrioritizedMessages()
Returns:
true if prioritized messages are enabled for the destination

setUseCache

void setUseCache(boolean value)
Parameters:
value - enable/disable caching on the destination

getSubscriptions

ObjectName[] getSubscriptions()
                              throws IOException,
                                     MalformedObjectNameException
Returns all the current subscription MBeans matching this destination

Returns:
the names of the subscriptions for this destination
Throws:
IOException
MalformedObjectNameException

getSlowConsumerStrategy

ObjectName getSlowConsumerStrategy()
                                   throws IOException,
                                          MalformedObjectNameException
Returns the slow consumer strategy MBean for this destination

Returns:
the name of the slow consumer handler MBean for this destination
Throws:
IOException
MalformedObjectNameException

getOptions

String getOptions()
Returns:
A string of destination options, name value pairs as URL queryString.


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