All Packages Class Hierarchy This Package Previous Next Index
Class calypso.util.ShellCommand
java.lang.Object
|
+----calypso.util.ShellCommand
- public abstract class ShellCommand
- extends Object
This is the base class for shell commands. A new command is defined
by extending this class, implementing the execute() method and
registering it to a Shell.
- Version:
- $Reveision: $
- Author:
- Juhana Räsänen
- See Also:
- Shell
-
longHelp
- This should be the full description of the command.
-
shortHelp
- This should be a one-line description of the command.
-
ShellCommand()
- Constructs a new command with default descriptions: "(no description)"
for the one-line description and null string for the full description.
-
ShellCommand(String)
- Constructs a new command with given short description.
-
ShellCommand(String, String)
- Constructs a new command with given description texts.
-
execute(StringTokenizer, Shell)
- Executes the command.
shortHelp
String shortHelp
- This should be a one-line description of the command. Printed by
the (default) help command of the Shell.
longHelp
String longHelp
- This should be the full description of the command. Printed by
the (default) help command of the Shell when the name of this
command is gicen as a parameter.
ShellCommand
public ShellCommand(String shortHelp_,
String longHelp_)
- Constructs a new command with given description texts.
- Parameters:
- shortHelp_ - a one-line description
- longHeml_ - the full description
ShellCommand
public ShellCommand(String shortHelp_)
- Constructs a new command with given short description.
- Parameters:
- shortHelp_ - a one-line description
ShellCommand
public ShellCommand()
- Constructs a new command with default descriptions: "(no description)"
for the one-line description and null string for the full description.
execute
public abstract void execute(StringTokenizer parameters_,
Shell shell_)
- Executes the command. Called by the Shell when user requests execution
of this command by typing in on the command line. The parameters are
given in tokenized form, the command name is not included in the
parameters, so parameters_.nextToken() is the first parameter.
- Parameters:
- parameters_ - The command line parameters
- shell_ - The shell that executed this command
All Packages Class Hierarchy This Package Previous Next Index