Class CreateCommand
- java.lang.Object
-
- org.apache.activemq.console.command.AbstractCommand
-
- org.apache.activemq.console.command.CreateCommand
-
- All Implemented Interfaces:
Command
public class CreateCommand extends AbstractCommand
-
-
Field Summary
Fields Modifier and Type Field Description 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[][]
fileWriteMap
protected String[]
helpFile
protected File
targetAmqBase
-
Fields inherited from class org.apache.activemq.console.command.AbstractCommand
COMMAND_OPTION_DELIMETER, context
-
-
Constructor Summary
Constructors Constructor Description CreateCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
copyActivemqConf(File srcBase, File targetBase, String activemqConf)
protected void
createSubDirs(File target, String[] subDirs)
String
getName()
String
getOneLineDescription()
protected void
handleOption(String token, List<String> tokens)
Handle the --amqconf options.protected void
printHelp()
Print the help messages for the specific taskprotected 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, handleException, parseOptions, printHelpFromFile, setCommandContext
-
-
-
-
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
-
fileWriteMap
protected String[][] fileWriteMap
-
brokerName
protected String brokerName
-
amqHome
protected File amqHome
-
targetAmqBase
protected File targetAmqBase
-
-
Method Detail
-
getName
public String getName()
-
getOneLineDescription
public String getOneLineDescription()
-
runTask
protected void runTask(List<String> tokens) throws Exception
Description copied from class:AbstractCommand
Run the specific task.- Specified by:
runTask
in classAbstractCommand
- Parameters:
tokens
- - command arguments- Throws:
Exception
-
handleOption
protected void handleOption(String token, List<String> tokens) throws Exception
Handle the --amqconf options.- Overrides:
handleOption
in classAbstractCommand
- Parameters:
token
- - option token to handletokens
- - 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
-
copyActivemqConf
protected void copyActivemqConf(File srcBase, File targetBase, String activemqConf) 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 classAbstractCommand
-
-