org.apache.activemq.console.command
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
public class ShutdownCommand
- extends AbstractJmxCommand
Field Summary |
protected java.lang.String[] |
helpFile
|
Method Summary |
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. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
helpFile
protected java.lang.String[] helpFile
ShutdownCommand
public ShutdownCommand()
runTask
protected void runTask(java.util.List brokerNames)
throws java.lang.Exception
- Shuts down the specified broker or brokers
- Specified by:
runTask
in class AbstractCommand
- Parameters:
brokerNames
- - names of brokers to shutdown
- Throws:
java.lang.Exception
stopBrokers
protected void stopBrokers(javax.management.MBeanServerConnection jmxConnection,
java.util.Collection brokerBeans)
throws java.lang.Exception
- Stops the list of brokers.
- Parameters:
jmxConnection
- - connection to the mbean serverbrokerBeans
- - broker mbeans to stop @throws Exception
- Throws:
java.lang.Exception
handleOption
protected void handleOption(java.lang.String token,
java.util.List<java.lang.String> tokens)
throws java.lang.Exception
- Handle the --all option.
- Overrides:
handleOption
in class AbstractJmxCommand
- Parameters:
token
- - option token to handletokens
- - succeeding command arguments
- Throws:
java.lang.Exception
printHelp
protected void printHelp()
- Print the help messages for the browse command
- Specified by:
printHelp
in class AbstractCommand
Copyright © 2005-2016. All Rights Reserved.