Class PurgeCommand
java.lang.Object
org.apache.activemq.console.command.AbstractCommand
org.apache.activemq.console.command.AbstractJmxCommand
org.apache.activemq.console.command.PurgeCommand
- All Implemented Interfaces:
Command
-
Field Summary
FieldsFields inherited from class org.apache.activemq.console.command.AbstractJmxCommand
DEFAULT_JMX_URLFields inherited from class org.apache.activemq.console.command.AbstractCommand
COMMAND_OPTION_DELIMETER, context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToSQL92(List<String> tokens) Converts the message selector as provided on command line argument to activem-admin into an SQL-92 conform string.getName()protected voidhandleOption(String token, List<String> tokens) Handle the --msgsel, --xmsgsel.protected voidPrint the help messages for the browse commandvoidpurgeQueue(ObjectName queue) Purge all the messages in the queueprotected voidExecute the purge command, which allows you to purge the messages in a given JMS destinationMethods inherited from class org.apache.activemq.console.command.AbstractJmxCommand
closeJmxConnection, createJmxConnection, execute, findJMXUrlByProcessId, getJmxPassword, getJmxServiceUrl, getJmxUser, getJVM, isJmxUseLocal, isSunJVM, setJmxPassword, setJmxServiceUrl, setJmxServiceUrl, setJmxUseLocal, setJmxUser, useJmxServiceUrlMethods inherited from class org.apache.activemq.console.command.AbstractCommand
handleException, parseOptions, printHelpFromFile, setCommandContext
-
Field Details
-
helpFile
-
-
Constructor Details
-
PurgeCommand
public PurgeCommand()
-
-
Method Details
-
getName
-
getOneLineDescription
-
runTask
Execute the purge command, which allows you to purge the messages in a given JMS destination- Specified by:
runTaskin classAbstractCommand- Parameters:
tokens- - command arguments- Throws:
Exception
-
purgeQueue
Purge all the messages in the queue- Parameters:
queue- - ObjectName of the queue to purge- Throws:
Exception
-
handleOption
Handle the --msgsel, --xmsgsel.- Overrides:
handleOptionin classAbstractJmxCommand- Parameters:
token- - option token to handletokens- - succeeding command arguments- Throws:
Exception
-
convertToSQL92
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:
printHelpin classAbstractCommand
-