org.apache.activemq.console.command
Class ShutdownCommand

java.lang.Object
  extended by org.apache.activemq.console.command.AbstractCommand
      extended by org.apache.activemq.console.command.AbstractJmxCommand
          extended by org.apache.activemq.console.command.ShutdownCommand
All Implemented Interfaces:
Command

public class ShutdownCommand
extends AbstractJmxCommand


Field Summary
protected  String[] 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
 
Constructor Summary
ShutdownCommand()
           
 
Method Summary
protected  void handleOption(String token, List tokens)
          Handle the --all option.
protected  void printHelp()
          Print the help messages for the browse command
protected  void runTask(List brokerNames)
          Shuts down the specified broker or brokers
protected  void stopBrokers(JMXServiceURL jmxServiceUrl, Collection brokerBeans)
          Stops the list of brokers.
 
Methods inherited from class org.apache.activemq.console.command.AbstractJmxCommand
closeJmxConnector, createJmxConnector, getJmxServiceUrl, setJmxServiceUrl, setJmxServiceUrl, useJmxServiceUrl
 
Methods inherited from class org.apache.activemq.console.command.AbstractCommand
execute, parseOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

helpFile

protected String[] helpFile
Constructor Detail

ShutdownCommand

public ShutdownCommand()
Method Detail

runTask

protected void runTask(List brokerNames)
                throws Exception
Shuts down the specified broker or brokers

Specified by:
runTask in class AbstractCommand
Parameters:
brokerNames - - names of brokers to shutdown
Throws:
Exception

stopBrokers

protected void stopBrokers(JMXServiceURL jmxServiceUrl,
                           Collection brokerBeans)
                    throws Exception
Stops the list of brokers.

Parameters:
jmxServiceUrl - - JMX service url to connect to
brokerBeans - - broker mbeans to stop
Throws:
Exception

handleOption

protected void handleOption(String token,
                            List tokens)
                     throws Exception
Handle the --all option.

Overrides:
handleOption in class AbstractJmxCommand
Parameters:
token - - option token to handle
tokens - - succeeding command arguments
Throws:
Exception

printHelp

protected void printHelp()
Print the help messages for the browse command

Specified by:
printHelp in class AbstractCommand


Copyright © 2011 Apache Software Foundation. All Rights Reserved.