Class ShutdownCommand
java.lang.Object
org.apache.activemq.console.command.AbstractCommand
org.apache.activemq.console.command.AbstractJmxCommand
org.apache.activemq.console.command.ShutdownCommand
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
StopGracefullyCommand
-
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 TypeMethodDescriptiongetName()protected voidhandleOption(String token, List<String> tokens) Handle the --all option.protected voidPrint the help messages for the browse commandprotected voidShuts down the specified broker or brokersprotected voidstopBrokers(MBeanServerConnection jmxConnection, Collection brokerBeans) Stops the list of brokers.Methods 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
-
ShutdownCommand
public ShutdownCommand()
-
-
Method Details
-
getName
-
getOneLineDescription
-
runTask
Shuts down the specified broker or brokers- Specified by:
runTaskin classAbstractCommand- Parameters:
brokerNames- - names of brokers to shutdown- Throws:
Exception
-
stopBrokers
protected void stopBrokers(MBeanServerConnection jmxConnection, Collection brokerBeans) throws Exception Stops the list of brokers.- Parameters:
jmxConnection- - connection to the mbean serverbrokerBeans- - broker mbeans to stop @throws Exception- Throws:
Exception
-
handleOption
Handle the --all option.- Overrides:
handleOptionin classAbstractJmxCommand- 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:
printHelpin classAbstractCommand
-