Package com.aspectran.shell.command
Interface Command
-
- All Known Implementing Classes:
AbstractCommand
,AspectCommand
,ClearCommand
,EchoCommand
,HelpCommand
,HistoryCommand
,JettyCommand
,JobCommand
,PBDecryptCommand
,PBEncryptCommand
,QuitCommand
,RestartCommand
,SysInfoCommand
,TransletCommand
,UndertowCommand
,VerboseCommand
public interface Command
The Command interface allows the command interpreter to delegate tasks.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Command.Descriptor
An interface that can be used to describe the the functionality of the command implementation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
execute(ParsedOptions options, Console console)
This method will be called as the starting point to execute the logic for the action mapped to this command.java.util.List<Arguments>
getArgumentsList()
Command.Descriptor
getDescriptor()
This method returns an instance of Command.Descriptor.Options
getOptions()
void
printHelp(Console console)
Prints the usage statement for the specified command.void
printQuickHelp(Console console)
-
-
-
Method Detail
-
getOptions
Options getOptions()
-
getArgumentsList
java.util.List<Arguments> getArgumentsList()
-
execute
void execute(ParsedOptions options, Console console) throws java.lang.Exception
This method will be called as the starting point to execute the logic for the action mapped to this command.- Parameters:
options
- the parsed optionsconsole
- the console- Throws:
java.lang.Exception
- if an error occurs during command execution
-
printHelp
void printHelp(Console console)
Prints the usage statement for the specified command.- Parameters:
console
- the Console instance
-
printQuickHelp
void printQuickHelp(Console console)
-
getDescriptor
Command.Descriptor getDescriptor()
This method returns an instance of Command.Descriptor. The descriptor is meta information about the command.- Returns:
- a Descriptor that is meta information about the command
-
-