public class JMSQueueControlImpl extends StandardMBean implements JMSQueueControl
Constructor and Description |
---|
JMSQueueControlImpl(ActiveMQDestination managedQueue,
QueueControl coreQueueControl,
JMSServerManager jmsServerManager,
MessageCounter counter) |
Modifier and Type | Method and Description |
---|---|
void |
addBinding(String binding)
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.
|
void |
flushExecutor()
it will flush one cycle on internal executors, so you would be sure that any pending tasks are done before you call
any other measure.
|
String |
getAddress()
Returns the ActiveMQ Artemis 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.
|
Long |
getFirstMessageAge()
Returns the age of the first message in milliseconds.
|
String |
getFirstMessageAsJSON()
Returns the first message on the queue as JSON
|
Long |
getFirstMessageTimestamp()
Returns the timestamp of the first message in milliseconds.
|
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.
|
String[] |
getRegistryBindings()
Returns the Registry bindings associated to this connection factory.
|
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() |
Map<String,Map<String,Object>[]> |
listDeliveringMessages()
Lists all the messages being deliver per consumer.
|
String |
listDeliveringMessagesAsJSON()
Executes a conversion of
JMSQueueControl.listDeliveringMessages() to JSON |
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.
|
Map<String,Object>[] |
listScheduledMessages()
Lists all the messages scheduled for delivery for this queue.
|
String |
listScheduledMessagesAsJSON()
Lists all the messages scheduled for delivery for this queue 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.
|
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.
|
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(ActiveMQDestination managedQueue, QueueControl coreQueueControl, JMSServerManager jmsServerManager, MessageCounter counter) throws Exception
Exception
public static String createFilterFromJMSSelector(String selectorStr) throws ActiveMQException
ActiveMQException
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 String getExpiryAddress()
JMSQueueControl
getExpiryAddress
in interface JMSQueueControl
public String getFirstMessageAsJSON() throws Exception
JMSQueueControl
getFirstMessageAsJSON
in interface JMSQueueControl
Exception
public Long getFirstMessageTimestamp() throws Exception
JMSQueueControl
getFirstMessageTimestamp
in interface JMSQueueControl
Exception
public Long getFirstMessageAge() throws Exception
JMSQueueControl
getFirstMessageAge
in interface JMSQueueControl
Exception
public void addBinding(String binding) throws Exception
JMSQueueControl
addBinding
in interface JMSQueueControl
Exception
public String[] getRegistryBindings()
JMSQueueControl
getRegistryBindings
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 Map<String,Object>[] listScheduledMessages() throws Exception
JMSQueueControl
listScheduledMessages
in interface JMSQueueControl
Exception
public String listScheduledMessagesAsJSON() throws Exception
JMSQueueControl
listScheduledMessagesAsJSON
in interface JMSQueueControl
Exception
public Map<String,Map<String,Object>[]> listDeliveringMessages() throws Exception
JMSQueueControl
Map<String,Object>[]
same way is returned by JMSQueueControl.listScheduledMessages()
listDeliveringMessages
in interface JMSQueueControl
Exception
public String listDeliveringMessagesAsJSON() throws Exception
JMSQueueControl
JMSQueueControl.listDeliveringMessages()
to JSONlistDeliveringMessagesAsJSON
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 void flushExecutor()
JMSQueueControl
flushExecutor
in interface JMSQueueControl
public MBeanInfo getMBeanInfo()
getMBeanInfo
in interface DynamicMBean
getMBeanInfo
in class StandardMBean
Copyright © 2016 JBoss by Red Hat. All rights reserved.