org.apache.activemq.console.command
public class ShutdownCommand extends AbstractJmxCommand
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
helpFile |
DEFAULT_JMX_URL
COMMAND_OPTION_DELIMETER, context
Constructor and Description |
---|
ShutdownCommand() |
Modifier and Type | Method and Description |
---|---|
protected void |
handleOption(java.lang.String token,
java.util.List<java.lang.String> tokens)
Handle the --all option.
|
protected void |
printHelp()
Print the help messages for the browse command
|
protected void |
runTask(java.util.List brokerNames)
Shuts down the specified broker or brokers
|
protected void |
stopBrokers(javax.management.MBeanServerConnection jmxConnection,
java.util.Collection brokerBeans)
Stops the list of brokers.
|
closeJmxConnection, createJmxConnection, execute, findJMXUrlByProcessId, getJmxPassword, getJmxServiceUrl, getJmxUser, getJVM, isJmxUseLocal, isSunJVM, setJmxPassword, setJmxServiceUrl, setJmxServiceUrl, setJmxUseLocal, setJmxUser, useJmxServiceUrl
parseOptions, setCommandContext
protected java.lang.String[] helpFile
public ShutdownCommand()
protected void runTask(java.util.List brokerNames) throws java.lang.Exception
runTask
in class AbstractCommand
brokerNames
- - names of brokers to shutdownjava.lang.Exception
protected void stopBrokers(javax.management.MBeanServerConnection jmxConnection, java.util.Collection brokerBeans) throws java.lang.Exception
jmxConnection
- - connection to the mbean serverbrokerBeans
- - broker mbeans to stop @throws Exceptionjava.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-2014. All Rights Reserved.