|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hyperic.util.shell.ShellCommandBase
public class ShellCommandBase
Constructor Summary | |
---|---|
ShellCommandBase()
|
Method Summary | |
---|---|
java.lang.String |
getCommandName()
|
java.io.PrintStream |
getErrStream()
|
java.util.ResourceBundle |
getMessages(java.lang.String string)
Load and initialize the ResourceBundle according to our default locale. |
java.util.ResourceBundle |
getMessages(java.lang.String string,
java.util.Locale loc)
Load and initialize the ResourceBundle according to the specified locale. |
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 |
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 ShellCommandHandler
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
public void processCommand(java.lang.String[] args) throws ShellCommandUsageException, ShellCommandExecException
ShellCommandHandler
processCommand
in interface ShellCommandHandler
args
- 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 ShellCommandHandler
public java.lang.String getSyntaxArgs()
public java.lang.String getUsageShort()
ShellCommandHandler
getUsageShort
in interface ShellCommandHandler
public java.lang.String getUsageHelp(java.lang.String[] args)
ShellCommandHandler
getUsageHelp
in interface ShellCommandHandler
public java.util.ResourceBundle getMessages(java.lang.String string)
string
- containing the package qualified resourcebundle name.
public java.util.ResourceBundle getMessages(java.lang.String string, java.util.Locale loc)
string
- containing the package qualified resourcebundle name.loc
- specific version of the resource bundle.
|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |