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 ClassesModifier and TypeInterfaceDescriptionstatic interface
An interface that can be used to describe the functionality of the command implementation. -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(ParsedOptions options, ShellConsole console) This method will be called as the starting point to execute the logic for the action mapped to this command.This method returns an instance of Command.Descriptor.void
printHelp
(ShellConsole console) Prints the usage statement for the specified command.void
printQuickHelp
(ShellConsole console)
-
Method Details
-
getOptions
Options getOptions() -
getArgumentsList
-
execute
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:
Exception
- if an error occurs during command execution
-
printHelp
Prints the usage statement for the specified command.- Parameters:
console
- the Console instance
-
printQuickHelp
-
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
-