public interface ShellCommandHandler
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getSyntax()
Get a description of the syntax for how a command should be invoked.
|
java.lang.String |
getUsageHelp(java.lang.String[] args)
Get some info on how to invoke this command.
|
java.lang.String |
getUsageShort()
Get a very brief (40 character) description of the command
|
void |
init(java.lang.String commandName,
ShellBase shell)
Initialize this command handler.
|
void |
processCommand(java.lang.String[] args)
Handle a command.
|
void init(java.lang.String commandName, ShellBase shell) throws ShellCommandInitException
commandName
- The name of the command.shell
- The shell. This is useful for command
that need to be able to interpret other commands, like the "help"
command, and for commands that need to get additional user input,
for example a login command that presents a password prompt.ShellCommandInitException
void processCommand(java.lang.String[] args) throws ShellCommandUsageException, ShellCommandExecException
args
- The args to the command.ShellCommandUsageException
- If the args are malformed.ShellCommandExecException
- If an error occurred
executing the command.java.lang.String getUsageHelp(java.lang.String[] args)
java.lang.String getUsageShort()
java.lang.String getSyntax()
Copyright ? 2004-2011 Hyperic. All Rights Reserved.