Class Command
- java.lang.Object
- 
- org.opennms.features.jmxconfiggenerator.commands.Command
 
- 
- Direct Known Subclasses:
- GraphCreateCommand,- JmxCommand,- Starter
 
 public abstract class Command extends java.lang.ObjectOverall Command class to group the available commands and provide common methods.
- 
- 
Field SummaryFields Modifier and Type Field Description protected ConsoleLogAdapterLOG
 - 
Constructor SummaryConstructors Constructor Description Command()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidexecute()Each subclass should implement an execute methode to implement its behaviour.protected abstract java.lang.StringgetDescription()Returns the description (used for the usage) of the command.protected org.kohsuke.args4j.CmdLineParsergetParser()protected booleanisHelp()voidprintUsage()Prints the usage of the command.voidrun(org.kohsuke.args4j.CmdLineParser parser)This method is invoked by the Main method to start the execution of the Command.protected abstract voidvalidate(org.kohsuke.args4j.CmdLineParser parser)
 
- 
- 
- 
Field Detail- 
LOGprotected final ConsoleLogAdapter LOG 
 
- 
 - 
Method Detail- 
isHelpprotected boolean isHelp() 
 - 
runpublic void run(org.kohsuke.args4j.CmdLineParser parser) throws CmdRunException, org.kohsuke.args4j.CmdLineExceptionThis method is invoked by the Main method to start the execution of the Command.- Parameters:
- parser-
- Throws:
- java.io.IOException
- org.kohsuke.args4j.CmdLineException
- CmdRunException
 
 - 
executeprotected abstract void execute() throws CmdRunException, org.kohsuke.args4j.CmdLineExceptionEach subclass should implement an execute methode to implement its behaviour.- Throws:
- java.io.IOException
- org.kohsuke.args4j.CmdLineException
- CmdRunException
 
 - 
validateprotected abstract void validate(org.kohsuke.args4j.CmdLineParser parser) throws org.kohsuke.args4j.CmdLineException- Throws:
- org.kohsuke.args4j.CmdLineException
 
 - 
printUsagepublic void printUsage() Prints the usage of the command.
 - 
getParserprotected org.kohsuke.args4j.CmdLineParser getParser() 
 - 
getDescriptionprotected abstract java.lang.String getDescription() Returns the description (used for the usage) of the command.- Returns:
- the command's description (used for the usage).
 
 
- 
 
-