org.apache.activemq.console.command
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
public class PurgeCommand
- extends AbstractJmxCommand
Method Summary |
protected void |
handleOption(String token,
List tokens)
Handle the --msgsel, --xmsgsel. |
protected void |
printHelp()
Print the help messages for the browse command |
void |
purgeMessages(ObjectName queue,
List messages)
Purge selected messages in the queue |
void |
purgeQueue(ObjectName queue)
Purge all the messages in the queue |
protected void |
runTask(List tokens)
Execute the purge command, which allows you to purge the messages in a given JMS destination |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
helpFile
protected String[] helpFile
PurgeCommand
public PurgeCommand()
runTask
protected void runTask(List 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
purgeMessages
public void purgeMessages(ObjectName queue,
List messages)
throws Exception
- Purge selected messages in the queue
- Parameters:
queue
- - ObjectName of the queue to purge the messages frommessages
- - List of messages to purge
- Throws:
Exception
handleOption
protected void handleOption(String token,
List tokens)
throws Exception
- Handle the --msgsel, --xmsgsel.
- Overrides:
handleOption
in class AbstractJmxCommand
- Parameters:
token
- - option token to handletokens
- - succeeding command arguments
- Throws:
Exception
printHelp
protected void printHelp()
- Print the help messages for the browse command
- Specified by:
printHelp
in class AbstractCommand
Copyright © 2011 Apache Software Foundation. All Rights Reserved.