public class PurgeCommand extends AbstractJmxCommand
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
helpFile |
DEFAULT_JMX_URL
COMMAND_OPTION_DELIMETER, context
Constructor and Description |
---|
PurgeCommand() |
Modifier and Type | Method and Description |
---|---|
protected void |
handleOption(java.lang.String token,
java.util.List<java.lang.String> tokens)
Handle the --msgsel, --xmsgsel.
|
protected void |
printHelp()
Print the help messages for the browse command
|
void |
purgeMessages(javax.management.ObjectName queue,
java.util.List messages)
Purge selected messages in the queue
|
void |
purgeQueue(javax.management.ObjectName queue)
Purge all the messages in the queue
|
protected void |
runTask(java.util.List<java.lang.String> tokens)
Execute the purge command, which allows you to purge the messages in a
given JMS destination
|
closeJmxConnection, createJmxConnection, execute, getJmxPassword, getJmxServiceUrl, getJmxUser, getJVM, isJmxUseLocal, isSunJVM, setJmxPassword, setJmxServiceUrl, setJmxServiceUrl, setJmxUseLocal, setJmxUser, useJmxServiceUrl
parseOptions, setCommandContext
protected java.lang.String[] helpFile
public PurgeCommand()
protected void runTask(java.util.List<java.lang.String> tokens) throws java.lang.Exception
runTask
in class AbstractCommand
tokens
- - command argumentsjava.lang.Exception
public void purgeQueue(javax.management.ObjectName queue) throws java.lang.Exception
queue
- - ObjectName of the queue to purgejava.lang.Exception
public void purgeMessages(javax.management.ObjectName queue, java.util.List messages) throws java.lang.Exception
queue
- - ObjectName of the queue to purge the messages frommessages
- - List of messages to purgejava.lang.Exception
protected void handleOption(java.lang.String token, java.util.List<java.lang.String> tokens) throws java.lang.Exception
handleOption
in class AbstractJmxCommand
token
- - option token to handletokens
- - succeeding command argumentsjava.lang.Exception
protected void printHelp()
printHelp
in class AbstractCommand
Copyright © 2005-2012. All Rights Reserved.