org.apache.activemq.broker.jmx
Interface QueueViewMBean

All Superinterfaces:
DestinationViewMBean
All Known Implementing Classes:
QueueView

public interface QueueViewMBean
extends DestinationViewMBean


Method Summary
 int copyMatchingMessagesTo(String selector, String destinationName)
          Copies the messages matching the given selector
 int copyMatchingMessagesTo(String selector, String destinationName, int maximumMessages)
          Copies the messages matching the given selector up to the maximum number of matched messages
 boolean copyMessageTo(String messageId, String destinationName)
          Copies a given message to another destination.
 int cursorSize()
           
 boolean doesCursorHaveMessagesBuffered()
           
 boolean doesCursorHaveSpace()
           
 long getCursorMemoryUsage()
           
 int getCursorPercentUsage()
           
 CompositeData getMessage(String messageId)
          Retrieve a message from the destination's queue.
 boolean isCacheEnabled()
           
 boolean isCursorFull()
           
 int moveMatchingMessagesTo(String selector, String destinationName)
          Moves the messages matching the given selector
 int moveMatchingMessagesTo(String selector, String destinationName, int maximumMessages)
          Moves the messages matching the given selector up to the maximum number of matched messages
 boolean moveMessageTo(String messageId, String destinationName)
          Moves the message to another destination.
 void purge()
          Removes all of the messages in the queue.
 int removeMatchingMessages(String selector)
          Removes the messages matching the given selector
 int removeMatchingMessages(String selector, int maximumMessages)
          Removes the messages matching the given selector up to the maximum number of matched messages
 boolean removeMessage(String messageId)
          Removes a message from the queue.
 boolean retryMessage(String messageId)
          Moves a message back to its original destination
 
Methods inherited from interface org.apache.activemq.broker.jmx.DestinationViewMBean
browse, browse, browseAsTable, browseAsTable, browseMessages, browseMessages, getAverageEnqueueTime, getBlockedProducerWarningInterval, getConsumerCount, getDequeueCount, getDispatchCount, getEnqueueCount, getExpiredCount, getInFlightCount, getMaxAuditDepth, getMaxEnqueueTime, getMaxPageSize, getMaxProducersToAudit, getMemoryLimit, getMemoryPercentUsage, getMemoryUsageByteCount, getMemoryUsagePortion, getMinEnqueueTime, getName, getOptions, getProducerCount, getQueueSize, getSlowConsumerStrategy, getSubscriptions, isAlwaysRetroactive, isPrioritizedMessages, isProducerFlowControl, isUseCache, resetStatistics, sendTextMessage, sendTextMessage, sendTextMessage, sendTextMessage, setAlwaysRetroactive, setBlockedProducerWarningInterval, setMaxAuditDepth, setMaxPageSize, setMaxProducersToAudit, setMemoryLimit, setMemoryUsagePortion, setProducerFlowControl, setUseCache
 

Method Detail

getMessage

CompositeData getMessage(String messageId)
                         throws OpenDataException
Retrieve a message from the destination's queue.

Parameters:
messageId - the message id of the message to retrieve
Returns:
A CompositeData object which is a JMX version of the messages
Throws:
OpenDataException

removeMessage

boolean removeMessage(String messageId)
                      throws Exception
Removes a message from the queue. If the message has already been dispatched to another consumer, the message cannot be deleted and this method will return false.

Parameters:
messageId -
Returns:
true if the message was found and could be successfully deleted.
Throws:
Exception

removeMatchingMessages

int removeMatchingMessages(String selector)
                           throws Exception
Removes the messages matching the given selector

Returns:
the number of messages removed
Throws:
Exception

removeMatchingMessages

int removeMatchingMessages(String selector,
                           int maximumMessages)
                           throws Exception
Removes the messages matching the given selector up to the maximum number of matched messages

Returns:
the number of messages removed
Throws:
Exception

purge

void purge()
           throws Exception
Removes all of the messages in the queue.

Throws:
Exception

copyMessageTo

boolean copyMessageTo(String messageId,
                      String destinationName)
                      throws Exception
Copies a given message to another destination.

Parameters:
messageId -
destinationName -
Returns:
true if the message was found and was successfully copied to the other destination.
Throws:
Exception

copyMatchingMessagesTo

int copyMatchingMessagesTo(String selector,
                           String destinationName)
                           throws Exception
Copies the messages matching the given selector

Returns:
the number of messages copied
Throws:
Exception

copyMatchingMessagesTo

int copyMatchingMessagesTo(String selector,
                           String destinationName,
                           int maximumMessages)
                           throws Exception
Copies the messages matching the given selector up to the maximum number of matched messages

Returns:
the number of messages copied
Throws:
Exception

moveMessageTo

boolean moveMessageTo(String messageId,
                      String destinationName)
                      throws Exception
Moves the message to another destination.

Parameters:
messageId -
destinationName -
Returns:
true if the message was found and was successfully copied to the other destination.
Throws:
Exception

retryMessage

boolean retryMessage(String messageId)
                     throws Exception
Moves a message back to its original destination

Throws:
Exception

moveMatchingMessagesTo

int moveMatchingMessagesTo(String selector,
                           String destinationName)
                           throws Exception
Moves the messages matching the given selector

Returns:
the number of messages removed
Throws:
Exception

moveMatchingMessagesTo

int moveMatchingMessagesTo(String selector,
                           String destinationName,
                           int maximumMessages)
                           throws Exception
Moves the messages matching the given selector up to the maximum number of matched messages

Throws:
Exception

doesCursorHaveSpace

boolean doesCursorHaveSpace()
Returns:
true if the message cursor has memory space available to page in more messages

isCursorFull

boolean isCursorFull()
Returns:
true if the cursor has reached its memory limit for paged in messages

doesCursorHaveMessagesBuffered

boolean doesCursorHaveMessagesBuffered()
Returns:
true if the cursor has messages buffered to deliver

getCursorMemoryUsage

long getCursorMemoryUsage()
Returns:
the cursor memory usage in bytes

getCursorPercentUsage

int getCursorPercentUsage()
Returns:
the cursor memory usage as a percentage

cursorSize

int cursorSize()
Returns:
the number of messages available to be paged in by the cursor

isCacheEnabled

boolean isCacheEnabled()
Returns:
true if caching is currently enabled of for the destination


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