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  java.lang.String amqConf
           
protected  java.io.File amqHome
           
protected  java.lang.String[] BASE_SUB_DIRS
           
protected  java.lang.String BROKER_NAME_REGEX
           
protected  java.lang.String brokerName
           
protected  java.lang.String DEFAULT_BROKERNAME_XPATH
           
protected  java.lang.String DEFAULT_TARGET_ACTIVEMQ_CONF
           
protected  java.lang.String[][] fileWriteMap
           
protected  java.lang.String[] helpFile
           
protected  java.io.File targetAmqBase
           
 
Fields inherited from class org.apache.activemq.console.command.AbstractCommand
COMMAND_OPTION_DELIMETER, context
 
Constructor Summary
CreateCommand()
           
 
Method Summary
protected  void copyActivemqConf(java.io.File srcBase, java.io.File targetBase, java.lang.String activemqConf)
           
protected  void createSubDirs(java.io.File target, java.lang.String[] subDirs)
           
protected  void handleOption(java.lang.String token, java.util.List<java.lang.String> tokens)
          Handle the --amqconf options.
protected  void printHelp()
          Print the help messages for the specific task
protected  void runTask(java.util.List<java.lang.String> tokens)
          Run the specific task.
protected  void writeFileMapping(java.io.File targetBase, java.lang.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 java.lang.String[] helpFile

DEFAULT_TARGET_ACTIVEMQ_CONF

protected final java.lang.String DEFAULT_TARGET_ACTIVEMQ_CONF
See Also:
Constant Field Values

DEFAULT_BROKERNAME_XPATH

protected final java.lang.String DEFAULT_BROKERNAME_XPATH
See Also:
Constant Field Values

BASE_SUB_DIRS

protected final java.lang.String[] BASE_SUB_DIRS

BROKER_NAME_REGEX

protected final java.lang.String BROKER_NAME_REGEX
See Also:
Constant Field Values

amqConf

protected java.lang.String amqConf

fileWriteMap

protected java.lang.String[][] fileWriteMap

brokerName

protected java.lang.String brokerName

amqHome

protected java.io.File amqHome

targetAmqBase

protected java.io.File targetAmqBase
Constructor Detail

CreateCommand

public CreateCommand()
Method Detail

runTask

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

Specified by:
runTask in class AbstractCommand
Parameters:
tokens - - command arguments
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 --amqconf options.

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

createSubDirs

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

writeFileMapping

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

copyActivemqConf

protected void copyActivemqConf(java.io.File srcBase,
                                java.io.File targetBase,
                                java.lang.String activemqConf)
                         throws java.io.IOException,
                                javax.xml.parsers.ParserConfigurationException,
                                org.xml.sax.SAXException,
                                javax.xml.transform.TransformerException,
                                javax.xml.xpath.XPathExpressionException
Throws:
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
javax.xml.transform.TransformerException
javax.xml.xpath.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-2015. All Rights Reserved.