org.apache.activemq.broker.jmx
Interface QueueViewMBean

All Superinterfaces:
DestinationViewMBean
All Known Implementing Classes:
QueueView

public interface QueueViewMBean
extends DestinationViewMBean


Method Summary
 int copyMatchingMessagesTo(java.lang.String selector, java.lang.String destinationName)
          Copies the messages matching the given selector
 int copyMatchingMessagesTo(java.lang.String selector, java.lang.String destinationName, int maximumMessages)
          Copies the messages matching the given selector up to the maximum number of matched messages
 boolean copyMessageTo(java.lang.String messageId, java.lang.String destinationName)
          Copies a given message to another destination.
 javax.management.openmbean.CompositeData getMessage(java.lang.String messageId)
          Retrieve a message from the destination's queue.
 int moveMatchingMessagesTo(java.lang.String selector, java.lang.String destinationName)
          Moves the messages matching the given selector
 int moveMatchingMessagesTo(java.lang.String selector, java.lang.String destinationName, int maximumMessages)
          Moves the messages matching the given selector up to the maximum number of matched messages
 boolean moveMessageTo(java.lang.String messageId, java.lang.String destinationName)
          Moves the message to another destination.
 void purge()
          Removes all of the messages in the queue.
 int removeMatchingMessages(java.lang.String selector)
          Removes the messages matching the given selector
 int removeMatchingMessages(java.lang.String selector, int maximumMessages)
          Removes the messages matching the given selector up to the maximum number of matched messages
 boolean removeMessage(java.lang.String messageId)
          Removes a message from the queue.
 
Methods inherited from interface org.apache.activemq.broker.jmx.DestinationViewMBean
browse, browse, browseAsTable, browseAsTable, browseMessages, browseMessages, getConsumerCount, getDequeueCount, getDispatchCount, getEnqueueCount, getMemoryLimit, getMemoryPercentageUsed, getName, getQueueSize, resetStatistics, sendTextMessage, sendTextMessage, setMemoryLimit
 

Method Detail

getMessage

javax.management.openmbean.CompositeData getMessage(java.lang.String messageId)
                                                    throws javax.management.openmbean.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:
javax.management.openmbean.OpenDataException

removeMessage

boolean removeMessage(java.lang.String messageId)
                      throws java.lang.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:
java.lang.Exception

removeMatchingMessages

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

Returns:
the number of messages removed
Throws:
java.lang.Exception

removeMatchingMessages

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

Returns:
the number of messages removed
Throws:
java.lang.Exception

purge

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


copyMessageTo

boolean copyMessageTo(java.lang.String messageId,
                      java.lang.String destinationName)
                      throws java.lang.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:
java.lang.Exception

copyMatchingMessagesTo

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

Returns:
the number of messages copied
Throws:
java.lang.Exception

copyMatchingMessagesTo

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

Returns:
the number of messages copied
Throws:
java.lang.Exception

moveMessageTo

boolean moveMessageTo(java.lang.String messageId,
                      java.lang.String destinationName)
                      throws java.lang.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:
java.lang.Exception

moveMatchingMessagesTo

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

Returns:
the number of messages removed
Throws:
java.lang.Exception

moveMatchingMessagesTo

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

Throws:
java.lang.Exception


Copyright © 2010 Apache Software Foundation. All Rights Reserved.