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
public class StopGracefullyCommand extends ShutdownCommand
A StopGracefullyCommand
-
-
Field Summary
Fields Modifier and Type Field Description protected String
connectorName
protected long
pollInterval
protected String
queueName
protected long
timeout
-
Fields inherited from class org.apache.activemq.console.command.ShutdownCommand
helpFile
-
Fields inherited from class org.apache.activemq.console.command.AbstractJmxCommand
DEFAULT_JMX_URL
-
Fields inherited from class org.apache.activemq.console.command.AbstractCommand
COMMAND_OPTION_DELIMETER, context
-
-
Constructor Summary
Constructors Constructor Description StopGracefullyCommand()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
String
getOneLineDescription()
protected void
handleOption(String token, List<String> tokens)
Handle the --all option.protected void
stopBrokers(MBeanServerConnection jmxConnection, Collection brokerBeans)
Stops the list of brokers.-
Methods inherited from class org.apache.activemq.console.command.ShutdownCommand
printHelp, runTask
-
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, useJmxServiceUrl
-
Methods inherited from class org.apache.activemq.console.command.AbstractCommand
handleException, parseOptions, printHelpFromFile, setCommandContext
-
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in interfaceCommand
- Overrides:
getName
in classShutdownCommand
-
getOneLineDescription
public String getOneLineDescription()
- Specified by:
getOneLineDescription
in interfaceCommand
- Overrides:
getOneLineDescription
in classShutdownCommand
-
stopBrokers
protected void stopBrokers(MBeanServerConnection jmxConnection, Collection brokerBeans) throws Exception
Stops the list of brokers.- Overrides:
stopBrokers
in classShutdownCommand
- Parameters:
jmxConnection
- - connection to the mbean serverbrokerBeans
- - broker mbeans to stop @throws Exception- Throws:
Exception
-
handleOption
protected void handleOption(String token, List<String> tokens) throws Exception
Description copied from class:ShutdownCommand
Handle the --all option.- Overrides:
handleOption
in classShutdownCommand
- Parameters:
token
- - option token to handletokens
- - succeeding command arguments- Throws:
Exception
-
-