org.apache.activemq.console.command
Class CreateCommand

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

public class CreateCommand
extends AbstractCommand


Field Summary
protected  String amqConf
           
protected  File amqHome
           
protected  String[] BASE_SUB_DIRS
           
protected  String BROKER_NAME_REGEX
           
protected  String brokerName
           
protected  String DEFAULT_BROKERNAME_XPATH
           
protected  String DEFAULT_TARGET_ACTIVEMQ_CONF
           
protected  String[][] fileCopyMap
           
protected  String[][] fileWriteMap
           
protected  String[] helpFile
           
protected  File targetAmqBase
           
 
Fields inherited from class org.apache.activemq.console.command.AbstractCommand
COMMAND_OPTION_DELIMETER, context
 
Constructor Summary
CreateCommand()
           
 
Method Summary
protected  void copyActivemqConf(File srcBase, File targetBase, String activemqConf)
           
protected  void copyFileMapping(File srcBase, File targetBase, String[][] fileMapping)
           
protected  void createSubDirs(File target, String[] subDirs)
           
protected  void handleOption(String token, List<String> tokens)
          Handle the --amqconf options.
protected  void printHelp()
          Print the help messages for the specific task
protected  void runTask(List<String> tokens)
          Run the specific task.
protected  void writeFileMapping(File targetBase, String[][] fileWriteMapping)
           
 
Methods inherited from class org.apache.activemq.console.command.AbstractCommand
execute, parseOptions, setCommandContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

helpFile

protected final String[] helpFile

DEFAULT_TARGET_ACTIVEMQ_CONF

protected final String DEFAULT_TARGET_ACTIVEMQ_CONF
See Also:
Constant Field Values

DEFAULT_BROKERNAME_XPATH

protected final String DEFAULT_BROKERNAME_XPATH
See Also:
Constant Field Values

BASE_SUB_DIRS

protected final String[] BASE_SUB_DIRS

BROKER_NAME_REGEX

protected final String BROKER_NAME_REGEX
See Also:
Constant Field Values

amqConf

protected String amqConf

fileCopyMap

protected String[][] fileCopyMap

fileWriteMap

protected String[][] fileWriteMap

brokerName

protected String brokerName

amqHome

protected File amqHome

targetAmqBase

protected File targetAmqBase
Constructor Detail

CreateCommand

public CreateCommand()
Method Detail

runTask

protected void runTask(List<String> tokens)
                throws Exception
Description copied from class: AbstractCommand
Run the specific task.

Specified by:
runTask in class AbstractCommand
Parameters:
tokens - - command arguments
Throws:
Exception

handleOption

protected void handleOption(String token,
                            List<String> tokens)
                     throws Exception
Handle the --amqconf options.

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

createSubDirs

protected void createSubDirs(File target,
                             String[] subDirs)
                      throws IOException
Throws:
IOException

writeFileMapping

protected void writeFileMapping(File targetBase,
                                String[][] fileWriteMapping)
                         throws IOException
Throws:
IOException

copyFileMapping

protected void copyFileMapping(File srcBase,
                               File targetBase,
                               String[][] fileMapping)
                        throws IOException
Throws:
IOException

copyActivemqConf

protected void copyActivemqConf(File srcBase,
                                File targetBase,
                                String activemqConf)
                         throws IOException,
                                ParserConfigurationException,
                                SAXException,
                                TransformerException,
                                XPathExpressionException
Throws:
IOException
ParserConfigurationException
SAXException
TransformerException
XPathExpressionException

printHelp

protected void printHelp()
Description copied from class: AbstractCommand
Print the help messages for the specific task

Specified by:
printHelp in class AbstractCommand


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.