Package com.aspectran.shell.command
Interface Command
-
- All Known Implementing Classes:
AbstractCommand,ClearCommand,HelpCommand,JettyCommand,PauseCommand,PBDecryptCommand,PBEncryptCommand,QuitCommand,RestartCommand,ResumeCommand,SysInfoCommand,TransletCommand,VerboseCommand
public interface CommandThe Command interface is there to allow Commander to delegate tasks.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceCommand.DescriptorAn 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 java.lang.Stringexecute(java.lang.String[] args)This method will be called as the starting point to execute the logic for the action mapped to this command.Command.DescriptorgetDescriptor()This method returns an instance of Command.Descriptor.voidprintUsage()Prints the usage statement for the specified command.voidprintUsage(Console console)Prints the usage statement for the specified command.
-
-
-
Method Detail
-
execute
java.lang.String execute(java.lang.String[] args) throws java.lang.ExceptionThis method will be called as the starting point to execute the logic for the action mapped to this command.- Parameters:
args- the command line arguments- Returns:
- the message output to the console as a result of an executed command
- Throws:
java.lang.Exception- if an error occurs during command execution
-
printUsage
void printUsage()
Prints the usage statement for the specified command.
-
printUsage
void printUsage(Console console)
Prints the usage statement for the specified command.- Parameters:
console- the Console instance
-
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
-
-