|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hyperic.sigar.shell.ShellCommandBase
public class ShellCommandBase
| Field Summary | |
|---|---|
protected java.lang.String |
itsCommandName
|
protected ShellBase |
itsShell
|
| Constructor Summary | |
|---|---|
ShellCommandBase()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getCommandName()
|
java.io.PrintStream |
getErrStream()
|
java.io.PrintStream |
getOutStream()
|
ShellBase |
getShell()
|
java.lang.String |
getSyntax()
Get a description of the syntax for how a command should be invoked. |
java.lang.String |
getSyntaxArgs()
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String itsCommandName
protected ShellBase itsShell
| Constructor Detail |
|---|
public ShellCommandBase()
| Method Detail |
|---|
public java.lang.String getCommandName()
public ShellBase getShell()
public java.io.PrintStream getOutStream()
public java.io.PrintStream getErrStream()
public void init(java.lang.String commandName,
ShellBase shell)
throws ShellCommandInitException
ShellCommandHandler
init in interface ShellCommandHandlercommandName - 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
public void processCommand(java.lang.String[] args)
throws ShellCommandUsageException,
ShellCommandExecException
ShellCommandHandler
processCommand in interface ShellCommandHandlerargs - The args to the command.
ShellCommandUsageException - If the args are malformed.
ShellCommandExecException - If an error occurred
executing the command.public java.lang.String getSyntax()
ShellCommandHandler
getSyntax in interface ShellCommandHandlerpublic java.lang.String getSyntaxArgs()
public java.lang.String getUsageShort()
ShellCommandHandler
getUsageShort in interface ShellCommandHandlerpublic java.lang.String getUsageHelp(java.lang.String[] args)
ShellCommandHandler
getUsageHelp in interface ShellCommandHandler
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||