Class StopGracefullyCommand
java.lang.Object
org.apache.activemq.console.command.AbstractCommand
org.apache.activemq.console.command.AbstractJmxCommand
org.apache.activemq.console.command.ShutdownCommand
org.apache.activemq.console.command.StopGracefullyCommand
- All Implemented Interfaces:
Command
A StopGracefullyCommand
-
Field Summary
FieldsFields inherited from class org.apache.activemq.console.command.ShutdownCommand
helpFileFields 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 voidstopBrokers(MBeanServerConnection jmxConnection, Collection brokerBeans) Stops the list of brokers.Methods inherited from class org.apache.activemq.console.command.ShutdownCommand
printHelp, runTaskMethods 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
-
connectorName
-
queueName
-
timeout
protected long timeout -
pollInterval
protected long pollInterval
-
-
Constructor Details
-
StopGracefullyCommand
public StopGracefullyCommand()Constructor
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceCommand- Overrides:
getNamein classShutdownCommand
-
getOneLineDescription
- Specified by:
getOneLineDescriptionin interfaceCommand- Overrides:
getOneLineDescriptionin classShutdownCommand
-
stopBrokers
protected void stopBrokers(MBeanServerConnection jmxConnection, Collection brokerBeans) throws Exception Stops the list of brokers.- Overrides:
stopBrokersin classShutdownCommand- Parameters:
jmxConnection- - connection to the mbean serverbrokerBeans- - broker mbeans to stop @throws Exception- Throws:
Exception
-
handleOption
Description copied from class:ShutdownCommandHandle the --all option.- Overrides:
handleOptionin classShutdownCommand- Parameters:
token- - option token to handletokens- - succeeding command arguments- Throws:
Exception
-