org.apache.activemq.console.command
Class StopGracefullyCommand

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
              extended by org.apache.activemq.console.command.StopGracefullyCommand
All Implemented Interfaces:
Command

public class StopGracefullyCommand
extends ShutdownCommand

A StopGracefullyCommand


Field Summary
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
StopGracefullyCommand()
          Constructor
 
Method Summary
 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
parseOptions, setCommandContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connectorName

protected String connectorName

queueName

protected String queueName

timeout

protected long timeout

pollInterval

protected long pollInterval
Constructor Detail

StopGracefullyCommand

public StopGracefullyCommand()
Constructor

Method Detail

getName

public String getName()
Specified by:
getName in interface Command
Overrides:
getName in class ShutdownCommand

getOneLineDescription

public String getOneLineDescription()
Specified by:
getOneLineDescription in interface Command
Overrides:
getOneLineDescription in class ShutdownCommand

stopBrokers

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

Overrides:
stopBrokers in class ShutdownCommand
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
Description copied from class: ShutdownCommand
Handle the --all option.

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


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.