Class PurgeCommand

All Implemented Interfaces:
Command

public class PurgeCommand extends AbstractJmxCommand
  • Field Details

    • helpFile

      protected String[] helpFile
  • Constructor Details

    • PurgeCommand

      public PurgeCommand()
  • Method Details

    • getName

      public String getName()
    • getOneLineDescription

      public String getOneLineDescription()
    • runTask

      protected void runTask(List<String> tokens) throws Exception
      Execute the purge command, which allows you to purge the messages in a given JMS destination
      Specified by:
      runTask in class AbstractCommand
      Parameters:
      tokens - - command arguments
      Throws:
      Exception
    • purgeQueue

      public void purgeQueue(ObjectName queue) throws Exception
      Purge all the messages in the queue
      Parameters:
      queue - - ObjectName of the queue to purge
      Throws:
      Exception
    • handleOption

      protected void handleOption(String token, List<String> tokens) throws Exception
      Handle the --msgsel, --xmsgsel.
      Overrides:
      handleOption in class AbstractJmxCommand
      Parameters:
      token - - option token to handle
      tokens - - succeeding command arguments
      Throws:
      Exception
    • convertToSQL92

      public String convertToSQL92(List<String> tokens)
      Converts the message selector as provided on command line argument to activem-admin into an SQL-92 conform string. E.g. "JMSMessageID='*:10',JMSPriority>5" gets converted into "(JMSMessageID='%:10') AND (JMSPriority>5)"
      Parameters:
      tokens - - List of message selector query parameters
      Returns:
      SQL-92 string of that query.
    • printHelp

      protected void printHelp()
      Print the help messages for the browse command
      Specified by:
      printHelp in class AbstractCommand