org.hornetq.jms.management.impl
Class JMSQueueControlImpl

java.lang.Object
  extended by javax.management.StandardMBean
      extended by org.hornetq.jms.management.impl.JMSQueueControlImpl
All Implemented Interfaces:
DynamicMBean, MBeanRegistration, DestinationControl, JMSQueueControl

public class JMSQueueControlImpl
extends StandardMBean
implements JMSQueueControl

Author:
Jeff Mesnil

Constructor Summary
JMSQueueControlImpl(HornetQDestination managedQueue, QueueControl coreQueueControl, JMSServerManager jmsServerManager, org.hornetq.core.messagecounter.MessageCounter counter)
           
 
Method Summary
 void addJNDI(String jndi)
           
 boolean changeMessagePriority(String messageID, int newPriority)
           
 int changeMessagesPriority(String filterStr, int newPriority)
           
 long countMessages(String filterStr)
           
static String createFilterFromJMSSelector(String selectorStr)
          Returns null if the string is null or empty
 boolean expireMessage(String messageID)
           
 int expireMessages(String filterStr)
           
 String getAddress()
           
 int getConsumerCount()
           
 String getDeadLetterAddress()
           
 int getDeliveringCount()
           
 String getExpiryAddress()
           
 String[] getJNDIBindings()
           
 MBeanInfo getMBeanInfo()
           
 long getMessageCount()
           
 long getMessagesAdded()
           
 String getName()
           
 long getScheduledCount()
           
 String getSelector()
           
 boolean isDurable()
           
 boolean isPaused()
           
 boolean isTemporary()
           
 String listConsumersAsJSON()
           
 String listMessageCounter()
           
 String listMessageCounterAsHTML()
           
 String listMessageCounterHistory()
           
 String listMessageCounterHistoryAsHTML()
           
 Map<String,Object>[] listMessages(String filterStr)
           
 String listMessagesAsJSON(String filter)
           
 boolean moveMessage(String messageID, String otherQueueName)
           
 boolean moveMessage(String messageID, String otherQueueName, boolean rejectDuplicates)
           
 int moveMessages(String filterStr, String otherQueueName)
           
 int moveMessages(String filterStr, String otherQueueName, boolean rejectDuplicates)
           
 void pause()
           
 void removeJNDI(String jndi)
           
 boolean removeMessage(String messageID)
           
 int removeMessages(String filterStr)
           
 void resetMessageCounter()
           
 void resume()
           
 int sendMessagesToDeadLetterAddress(String filterStr)
           
 boolean sendMessageToDeadLetterAddress(String messageID)
           
 void setDeadLetterAddress(String deadLetterAddress)
           
 void setExpiryAddress(String expiryAddres)
           
 
Methods inherited from class javax.management.StandardMBean
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSQueueControlImpl

public JMSQueueControlImpl(HornetQDestination managedQueue,
                           QueueControl coreQueueControl,
                           JMSServerManager jmsServerManager,
                           org.hornetq.core.messagecounter.MessageCounter counter)
                    throws Exception
Throws:
Exception
Method Detail

createFilterFromJMSSelector

public static String createFilterFromJMSSelector(String selectorStr)
                                          throws HornetQException
Returns null if the string is null or empty

Throws:
HornetQException

getName

public String getName()
Specified by:
getName in interface DestinationControl

getAddress

public String getAddress()
Specified by:
getAddress in interface DestinationControl

isTemporary

public boolean isTemporary()
Specified by:
isTemporary in interface DestinationControl

getMessageCount

public long getMessageCount()
Specified by:
getMessageCount in interface DestinationControl

getMessagesAdded

public long getMessagesAdded()
Specified by:
getMessagesAdded in interface DestinationControl

getConsumerCount

public int getConsumerCount()
Specified by:
getConsumerCount in interface JMSQueueControl

getDeliveringCount

public int getDeliveringCount()
Specified by:
getDeliveringCount in interface DestinationControl

getScheduledCount

public long getScheduledCount()
Specified by:
getScheduledCount in interface JMSQueueControl

isDurable

public boolean isDurable()

getDeadLetterAddress

public String getDeadLetterAddress()
Specified by:
getDeadLetterAddress in interface JMSQueueControl

setDeadLetterAddress

public void setDeadLetterAddress(String deadLetterAddress)
                          throws Exception
Specified by:
setDeadLetterAddress in interface JMSQueueControl
Throws:
Exception

getExpiryAddress

public String getExpiryAddress()
Specified by:
getExpiryAddress in interface JMSQueueControl

setExpiryAddress

public void setExpiryAddress(String expiryAddres)
                      throws Exception
Specified by:
setExpiryAddress in interface JMSQueueControl
Throws:
Exception

addJNDI

public void addJNDI(String jndi)
             throws Exception
Specified by:
addJNDI in interface JMSQueueControl
Throws:
Exception

removeJNDI

public void removeJNDI(String jndi)
                throws Exception
Throws:
Exception

getJNDIBindings

public String[] getJNDIBindings()
Specified by:
getJNDIBindings in interface JMSQueueControl

removeMessage

public boolean removeMessage(String messageID)
                      throws Exception
Specified by:
removeMessage in interface JMSQueueControl
Throws:
Exception

removeMessages

public int removeMessages(String filterStr)
                   throws Exception
Specified by:
removeMessages in interface DestinationControl
Specified by:
removeMessages in interface JMSQueueControl
Throws:
Exception

listMessages

public Map<String,Object>[] listMessages(String filterStr)
                                  throws Exception
Specified by:
listMessages in interface JMSQueueControl
Throws:
Exception

listMessagesAsJSON

public String listMessagesAsJSON(String filter)
                          throws Exception
Specified by:
listMessagesAsJSON in interface JMSQueueControl
Throws:
Exception

countMessages

public long countMessages(String filterStr)
                   throws Exception
Specified by:
countMessages in interface JMSQueueControl
Throws:
Exception

expireMessage

public boolean expireMessage(String messageID)
                      throws Exception
Specified by:
expireMessage in interface JMSQueueControl
Throws:
Exception

expireMessages

public int expireMessages(String filterStr)
                   throws Exception
Specified by:
expireMessages in interface JMSQueueControl
Throws:
Exception

sendMessageToDeadLetterAddress

public boolean sendMessageToDeadLetterAddress(String messageID)
                                       throws Exception
Specified by:
sendMessageToDeadLetterAddress in interface JMSQueueControl
Throws:
Exception

sendMessagesToDeadLetterAddress

public int sendMessagesToDeadLetterAddress(String filterStr)
                                    throws Exception
Specified by:
sendMessagesToDeadLetterAddress in interface JMSQueueControl
Throws:
Exception

changeMessagePriority

public boolean changeMessagePriority(String messageID,
                                     int newPriority)
                              throws Exception
Specified by:
changeMessagePriority in interface JMSQueueControl
Throws:
Exception

changeMessagesPriority

public int changeMessagesPriority(String filterStr,
                                  int newPriority)
                           throws Exception
Specified by:
changeMessagesPriority in interface JMSQueueControl
Throws:
Exception

moveMessage

public boolean moveMessage(String messageID,
                           String otherQueueName)
                    throws Exception
Specified by:
moveMessage in interface JMSQueueControl
Throws:
Exception

moveMessage

public boolean moveMessage(String messageID,
                           String otherQueueName,
                           boolean rejectDuplicates)
                    throws Exception
Specified by:
moveMessage in interface JMSQueueControl
Throws:
Exception

moveMessages

public int moveMessages(String filterStr,
                        String otherQueueName,
                        boolean rejectDuplicates)
                 throws Exception
Specified by:
moveMessages in interface JMSQueueControl
Throws:
Exception

moveMessages

public int moveMessages(String filterStr,
                        String otherQueueName)
                 throws Exception
Specified by:
moveMessages in interface JMSQueueControl
Throws:
Exception

listConsumersAsJSON

public String listConsumersAsJSON()
                           throws Exception
Specified by:
listConsumersAsJSON in interface JMSQueueControl
Throws:
Exception

listMessageCounter

public String listMessageCounter()
Specified by:
listMessageCounter in interface JMSQueueControl

resetMessageCounter

public void resetMessageCounter()
                         throws Exception
Specified by:
resetMessageCounter in interface JMSQueueControl
Throws:
Exception

listMessageCounterAsHTML

public String listMessageCounterAsHTML()
Specified by:
listMessageCounterAsHTML in interface JMSQueueControl

listMessageCounterHistory

public String listMessageCounterHistory()
                                 throws Exception
Specified by:
listMessageCounterHistory in interface JMSQueueControl
Throws:
Exception

listMessageCounterHistoryAsHTML

public String listMessageCounterHistoryAsHTML()
Specified by:
listMessageCounterHistoryAsHTML in interface JMSQueueControl

isPaused

public boolean isPaused()
                 throws Exception
Specified by:
isPaused in interface JMSQueueControl
Throws:
Exception

pause

public void pause()
           throws Exception
Specified by:
pause in interface JMSQueueControl
Throws:
Exception

resume

public void resume()
            throws Exception
Specified by:
resume in interface JMSQueueControl
Throws:
Exception

getSelector

public String getSelector()
Specified by:
getSelector in interface JMSQueueControl

getMBeanInfo

public MBeanInfo getMBeanInfo()
Specified by:
getMBeanInfo in interface DynamicMBean
Overrides:
getMBeanInfo in class StandardMBean


Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.