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, setImplementation
public JMSQueueControlImpl(HornetQDestination managedQueue, QueueControl coreQueueControl, JMSServerManager jmsServerManager, MessageCounter counter) throws Exception
Exception
public static String createFilterFromJMSSelector(String selectorStr) throws HornetQException
HornetQException
public String getName()
DestinationControl
getName
in interface DestinationControl
public String getAddress()
DestinationControl
getAddress
in interface DestinationControl
public boolean isTemporary()
DestinationControl
isTemporary
in interface DestinationControl
public long getMessageCount()
DestinationControl
getMessageCount
in interface DestinationControl
public long getMessagesAdded()
DestinationControl
getMessagesAdded
in interface DestinationControl
public int getConsumerCount()
JMSQueueControl
getConsumerCount
in interface JMSQueueControl
public int getDeliveringCount()
DestinationControl
getDeliveringCount
in interface DestinationControl
public long getScheduledCount()
JMSQueueControl
getScheduledCount
in interface JMSQueueControl
public boolean isDurable()
public String getDeadLetterAddress()
JMSQueueControl
getDeadLetterAddress
in interface JMSQueueControl
public void setDeadLetterAddress(String deadLetterAddress) throws Exception
JMSQueueControl
setDeadLetterAddress
in interface JMSQueueControl
Exception
public String getExpiryAddress()
JMSQueueControl
getExpiryAddress
in interface JMSQueueControl
public void setExpiryAddress(String expiryAddres) throws Exception
JMSQueueControl
setExpiryAddress
in interface JMSQueueControl
Exception
public void addJNDI(String jndi) throws Exception
JMSQueueControl
addJNDI
in interface JMSQueueControl
Exception
public void removeJNDI(String jndi) throws Exception
removeJNDI
in interface JMSQueueControl
Exception
public String[] getJNDIBindings()
JMSQueueControl
getJNDIBindings
in interface JMSQueueControl
public boolean removeMessage(String messageID) throws Exception
JMSQueueControl
removeMessage
in interface JMSQueueControl
true
if the message was removed, false
elseException
public int removeMessages(String filterStr) throws Exception
JMSQueueControl
null
or an empty filter will remove all messages from this queue.removeMessages
in interface DestinationControl
removeMessages
in interface JMSQueueControl
Exception
public Map<String,Object>[] listMessages(String filterStr) throws Exception
JMSQueueControl
null
or an empty filter will list all messages from this queue.listMessages
in interface JMSQueueControl
Exception
public String listMessagesAsJSON(String filter) throws Exception
JMSQueueControl
null
or an empty filter will list all messages from this queue.listMessagesAsJSON
in interface JMSQueueControl
Exception
public long countMessages(String filterStr) throws Exception
JMSQueueControl
null
or an empty filter will count all messages from this queue.countMessages
in interface JMSQueueControl
Exception
public boolean expireMessage(String messageID) throws Exception
JMSQueueControl
expireMessage
in interface JMSQueueControl
true
if the message was expired, false
elseException
public int expireMessages(String filterStr) throws Exception
JMSQueueControl
null
or an empty filter will expire all messages from this queue.expireMessages
in interface JMSQueueControl
Exception
public boolean sendMessageToDeadLetterAddress(String messageID) throws Exception
JMSQueueControl
sendMessageToDeadLetterAddress
in interface JMSQueueControl
true
if the message was sent to the dead letter address, false
elseException
public int sendMessagesToDeadLetterAddress(String filterStr) throws Exception
JMSQueueControl
null
or an empty filter will send all messages from this queue.sendMessagesToDeadLetterAddress
in interface JMSQueueControl
Exception
public boolean changeMessagePriority(String messageID, int newPriority) throws Exception
JMSQueueControl
changeMessagePriority
in interface JMSQueueControl
newPriority
- between 0 and 9 inclusive.true
if the message priority was changedException
public int changeMessagesPriority(String filterStr, int newPriority) throws Exception
JMSQueueControl
null
or an empty filter will change all messages from this queue.changeMessagesPriority
in interface JMSQueueControl
Exception
public boolean moveMessage(String messageID, String otherQueueName) throws Exception
JMSQueueControl
moveMessage
in interface JMSQueueControl
true
if the message was moved, false
elseException
public boolean moveMessage(String messageID, String otherQueueName, boolean rejectDuplicates) throws Exception
JMSQueueControl
moveMessage
in interface JMSQueueControl
true
if the message was moved, false
elseException
public int moveMessages(String filterStr, String otherQueueName, boolean rejectDuplicates) throws Exception
JMSQueueControl
null
or an empty filter will move all messages from this queue.moveMessages
in interface JMSQueueControl
Exception
public int moveMessages(String filterStr, String otherQueueName) throws Exception
JMSQueueControl
null
or an empty filter will move all messages from this queue.moveMessages
in interface JMSQueueControl
Exception
public String listConsumersAsJSON() throws Exception
listConsumersAsJSON
in interface JMSQueueControl
Exception
public String listMessageCounter()
JMSQueueControl
listMessageCounter
in interface JMSQueueControl
public void resetMessageCounter() throws Exception
JMSQueueControl
resetMessageCounter
in interface JMSQueueControl
Exception
public String listMessageCounterAsHTML()
JMSQueueControl
listMessageCounterAsHTML
in interface JMSQueueControl
public String listMessageCounterHistory() throws Exception
JMSQueueControl
listMessageCounterHistory
in interface JMSQueueControl
Exception
public String listMessageCounterHistoryAsHTML()
JMSQueueControl
listMessageCounterHistoryAsHTML
in interface JMSQueueControl
public boolean isPaused() throws Exception
JMSQueueControl
isPaused
in interface JMSQueueControl
Exception
public void pause() throws Exception
JMSQueueControl
pause
in interface JMSQueueControl
Exception
public void resume() throws Exception
JMSQueueControl
resume
in interface JMSQueueControl
Exception
public String getSelector()
JMSQueueControl
getSelector
in interface JMSQueueControl
public MBeanInfo getMBeanInfo()
getMBeanInfo
in interface DynamicMBean
getMBeanInfo
in class StandardMBean
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.