public class JMSQueueControlImpl extends StandardMBean implements JMSQueueControl
| Constructor and Description |
|---|
JMSQueueControlImpl(HornetQDestination managedQueue,
QueueControl coreQueueControl,
JMSServerManager jmsServerManager,
MessageCounter counter) |
| Modifier and Type | Method and Description |
|---|---|
void |
addJNDI(String jndi)
Add the JNDI binding to this destination
|
boolean |
changeMessagePriority(String messageID,
int newPriority)
Changes the message's priority corresponding to the specified message ID to the specified priority.
|
int |
changeMessagesPriority(String filterStr,
int newPriority)
Changes the priority for all the message corresponding to the specified filter to the specified priority.
|
long |
countMessages(String filterStr)
Counts the number of messages in this queue matching the specified filter.
|
static String |
createFilterFromJMSSelector(String selectorStr)
Returns null if the string is null or empty
|
boolean |
expireMessage(String messageID)
Expires the message corresponding to the specified message ID.
|
int |
expireMessages(String filterStr)
Expires all the message corresponding to the specified filter.
|
String |
getAddress()
Returns the HornetQ address corresponding to this destination.
|
int |
getConsumerCount()
Returns the number of consumers consuming messages from this queue.
|
String |
getDeadLetterAddress()
Returns the dead-letter address associated to this queue.
|
int |
getDeliveringCount()
Returns the number of messages that this queue is currently delivering to its consumers.
|
String |
getExpiryAddress()
Returns the expiry address associated to this queue.
|
String[] |
getJNDIBindings()
Returns the JNDI bindings associated to this connection factory.
|
MBeanInfo |
getMBeanInfo() |
long |
getMessageCount()
Returns the number of messages currently in this destination.
|
long |
getMessagesAdded()
Returns the number of messages added to this queue since it was created.
|
String |
getName()
Returns the name of this destination.
|
long |
getScheduledCount()
Returns the number of scheduled messages in this queue.
|
String |
getSelector()
returns the selector for the queue
|
boolean |
isDurable() |
boolean |
isPaused()
Returns whether the queue is paused.
|
boolean |
isTemporary()
Returns whether this destination is temporary.
|
String |
listConsumersAsJSON() |
String |
listMessageCounter()
Lists the message counter for this queue.
|
String |
listMessageCounterAsHTML()
Lists the message counter for this queue as a HTML table.
|
String |
listMessageCounterHistory()
Lists the message counter history for this queue.
|
String |
listMessageCounterHistoryAsHTML()
Lists the message counter history for this queue as a HTML table.
|
Map<String,Object>[] |
listMessages(String filterStr)
Lists all the JMS messages in this queue matching the specified filter.
|
String |
listMessagesAsJSON(String filter)
Lists all the JMS messages in this queue matching the specified filter using JSON serialization.
|
boolean |
moveMessage(String messageID,
String otherQueueName)
Moves the message corresponding to the specified message ID to the specified other queue.
|
boolean |
moveMessage(String messageID,
String otherQueueName,
boolean rejectDuplicates)
Moves the message corresponding to the specified message ID to the specified other queue.
|
int |
moveMessages(String filterStr,
String otherQueueName)
Moves all the message corresponding to the specified filter to the specified other queue.
|
int |
moveMessages(String filterStr,
String otherQueueName,
boolean rejectDuplicates)
Moves all the message corresponding to the specified filter to the specified other queue.
|
void |
pause()
Pauses the queue.
|
void |
removeJNDI(String jndi) |
boolean |
removeMessage(String messageID)
Removes the message corresponding to the specified message ID.
|
int |
removeMessages(String filterStr)
Removes all the message corresponding to the specified filter.
|
void |
resetMessageCounter()
Resets the message counter for this queue.
|
void |
resume()
Resumes the queue.
|
int |
sendMessagesToDeadLetterAddress(String filterStr)
Sends all the message corresponding to the specified filter to this queue's dead letter address.
|
boolean |
sendMessageToDeadLetterAddress(String messageID)
Sends the message corresponding to the specified message ID to this queue's dead letter address.
|
void |
setDeadLetterAddress(String deadLetterAddress)
Sets the dead-letter address associated to this queue to the specified deadLetterAddress.
|
void |
setExpiryAddress(String expiryAddres)
Sets the expiry address associated to this queue to the specified expiryAddress.
|
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInterface, getParameterName, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementationpublic JMSQueueControlImpl(HornetQDestination managedQueue, QueueControl coreQueueControl, JMSServerManager jmsServerManager, MessageCounter counter) throws Exception
Exceptionpublic static String createFilterFromJMSSelector(String selectorStr) throws HornetQException
HornetQExceptionpublic String getName()
DestinationControlgetName in interface DestinationControlpublic String getAddress()
DestinationControlgetAddress in interface DestinationControlpublic boolean isTemporary()
DestinationControlisTemporary in interface DestinationControlpublic long getMessageCount()
DestinationControlgetMessageCount in interface DestinationControlpublic long getMessagesAdded()
DestinationControlgetMessagesAdded in interface DestinationControlpublic int getConsumerCount()
JMSQueueControlgetConsumerCount in interface JMSQueueControlpublic int getDeliveringCount()
DestinationControlgetDeliveringCount in interface DestinationControlpublic long getScheduledCount()
JMSQueueControlgetScheduledCount in interface JMSQueueControlpublic boolean isDurable()
public String getDeadLetterAddress()
JMSQueueControlgetDeadLetterAddress in interface JMSQueueControlpublic void setDeadLetterAddress(String deadLetterAddress) throws Exception
JMSQueueControlsetDeadLetterAddress in interface JMSQueueControlExceptionpublic String getExpiryAddress()
JMSQueueControlgetExpiryAddress in interface JMSQueueControlpublic void setExpiryAddress(String expiryAddres) throws Exception
JMSQueueControlsetExpiryAddress in interface JMSQueueControlExceptionpublic void addJNDI(String jndi) throws Exception
JMSQueueControladdJNDI in interface JMSQueueControlExceptionpublic void removeJNDI(String jndi) throws Exception
removeJNDI in interface JMSQueueControlExceptionpublic String[] getJNDIBindings()
JMSQueueControlgetJNDIBindings in interface JMSQueueControlpublic boolean removeMessage(String messageID) throws Exception
JMSQueueControlremoveMessage in interface JMSQueueControltrue if the message was removed, false elseExceptionpublic int removeMessages(String filterStr) throws Exception
JMSQueueControlnull or an empty filter will remove all messages from this queue.removeMessages in interface DestinationControlremoveMessages in interface JMSQueueControlExceptionpublic Map<String,Object>[] listMessages(String filterStr) throws Exception
JMSQueueControlnull or an empty filter will list all messages from this queue.listMessages in interface JMSQueueControlExceptionpublic String listMessagesAsJSON(String filter) throws Exception
JMSQueueControlnull or an empty filter will list all messages from this queue.listMessagesAsJSON in interface JMSQueueControlExceptionpublic long countMessages(String filterStr) throws Exception
JMSQueueControlnull or an empty filter will count all messages from this queue.countMessages in interface JMSQueueControlExceptionpublic boolean expireMessage(String messageID) throws Exception
JMSQueueControlexpireMessage in interface JMSQueueControltrue if the message was expired, false elseExceptionpublic int expireMessages(String filterStr) throws Exception
JMSQueueControlnull or an empty filter will expire all messages from this queue.expireMessages in interface JMSQueueControlExceptionpublic boolean sendMessageToDeadLetterAddress(String messageID) throws Exception
JMSQueueControlsendMessageToDeadLetterAddress in interface JMSQueueControltrue if the message was sent to the dead letter address, false elseExceptionpublic int sendMessagesToDeadLetterAddress(String filterStr) throws Exception
JMSQueueControlnull or an empty filter will send all messages from this queue.sendMessagesToDeadLetterAddress in interface JMSQueueControlExceptionpublic boolean changeMessagePriority(String messageID, int newPriority) throws Exception
JMSQueueControlchangeMessagePriority in interface JMSQueueControlnewPriority - between 0 and 9 inclusive.true if the message priority was changedExceptionpublic int changeMessagesPriority(String filterStr, int newPriority) throws Exception
JMSQueueControlnull or an empty filter will change all messages from this queue.changeMessagesPriority in interface JMSQueueControlExceptionpublic boolean moveMessage(String messageID, String otherQueueName) throws Exception
JMSQueueControlmoveMessage in interface JMSQueueControltrue if the message was moved, false elseExceptionpublic boolean moveMessage(String messageID, String otherQueueName, boolean rejectDuplicates) throws Exception
JMSQueueControlmoveMessage in interface JMSQueueControltrue if the message was moved, false elseExceptionpublic int moveMessages(String filterStr, String otherQueueName, boolean rejectDuplicates) throws Exception
JMSQueueControlnull or an empty filter will move all messages from this queue.moveMessages in interface JMSQueueControlExceptionpublic int moveMessages(String filterStr, String otherQueueName) throws Exception
JMSQueueControlnull or an empty filter will move all messages from this queue.moveMessages in interface JMSQueueControlExceptionpublic String listConsumersAsJSON() throws Exception
listConsumersAsJSON in interface JMSQueueControlExceptionpublic String listMessageCounter()
JMSQueueControllistMessageCounter in interface JMSQueueControlpublic void resetMessageCounter()
throws Exception
JMSQueueControlresetMessageCounter in interface JMSQueueControlExceptionpublic String listMessageCounterAsHTML()
JMSQueueControllistMessageCounterAsHTML in interface JMSQueueControlpublic String listMessageCounterHistory() throws Exception
JMSQueueControllistMessageCounterHistory in interface JMSQueueControlExceptionpublic String listMessageCounterHistoryAsHTML()
JMSQueueControllistMessageCounterHistoryAsHTML in interface JMSQueueControlpublic boolean isPaused()
throws Exception
JMSQueueControlisPaused in interface JMSQueueControlExceptionpublic void pause()
throws Exception
JMSQueueControlpause in interface JMSQueueControlExceptionpublic void resume()
throws Exception
JMSQueueControlresume in interface JMSQueueControlExceptionpublic String getSelector()
JMSQueueControlgetSelector in interface JMSQueueControlpublic MBeanInfo getMBeanInfo()
getMBeanInfo in interface DynamicMBeangetMBeanInfo in class StandardMBeanCopyright © 2012 JBoss by Red Hat. All Rights Reserved.