Class ShutdownCommand

All Implemented Interfaces:
Command
Direct Known Subclasses:
StopGracefullyCommand

public class ShutdownCommand extends AbstractJmxCommand
  • Field Details

    • helpFile

      protected String[] helpFile
  • Constructor Details

    • ShutdownCommand

      public ShutdownCommand()
  • Method Details

    • getName

      public String getName()
    • getOneLineDescription

      public String getOneLineDescription()
    • 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(MBeanServerConnection jmxConnection, Collection brokerBeans) throws Exception
      Stops the list of brokers.
      Parameters:
      jmxConnection - - connection to the mbean server
      brokerBeans - - broker mbeans to stop @throws Exception
      Throws:
      Exception
    • handleOption

      protected void handleOption(String token, List<String> 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