Package com.aspectran.shell.command
Class AbstractCommand
- java.lang.Object
-
- com.aspectran.shell.command.AbstractCommand
-
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
ClearCommand
,HelpCommand
,JettyCommand
,PauseCommand
,PBDecryptCommand
,PBEncryptCommand
,QuitCommand
,RestartCommand
,ResumeCommand
,SysInfoCommand
,TransletCommand
,VerboseCommand
public abstract class AbstractCommand extends java.lang.Object implements Command
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.aspectran.shell.command.Command
Command.Descriptor
-
-
Constructor Summary
Constructors Constructor Description AbstractCommand(CommandRegistry registry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addOption(Option option)
CommandRegistry
getCommandRegistry()
Console
getConsole()
Options
getOptions()
protected OptionParser
getParser()
ShellService
getService()
protected ParsedOptions
parse(java.lang.String[] args)
void
printUsage()
Prints the usage statement for the specified command.void
printUsage(Console console)
Prints the usage statement for the specified command.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.aspectran.shell.command.Command
execute, getDescriptor
-
-
-
-
Field Detail
-
options
protected final Options options
-
-
Constructor Detail
-
AbstractCommand
public AbstractCommand(CommandRegistry registry)
-
-
Method Detail
-
getService
public ShellService getService()
-
getConsole
public Console getConsole()
-
getCommandRegistry
public CommandRegistry getCommandRegistry()
-
getOptions
public Options getOptions()
-
addOption
protected void addOption(Option option)
-
parse
protected ParsedOptions parse(java.lang.String[] args) throws OptionParserException
- Throws:
OptionParserException
-
getParser
protected OptionParser getParser()
-
printUsage
public void printUsage()
Description copied from interface:Command
Prints the usage statement for the specified command.- Specified by:
printUsage
in interfaceCommand
-
printUsage
public void printUsage(Console console)
Description copied from interface:Command
Prints the usage statement for the specified command.- Specified by:
printUsage
in interfaceCommand
- Parameters:
console
- the Console instance
-
-