comshell
Class ComShell
java.lang.Object
|
+--comshell.ComShell
- public class ComShell
- extends java.lang.Object
This class represents a simple example of how to use the command
shell package. Other implementations of a command shell should
build their own local version of this class. Note that input can
come from a script rather than the command line and as usual,
output can be redirected.
- Author:
- Scott Sanner
Constructor Summary |
ComShell()
Constructor - Initializes user-defined commands and environmental vars |
Method Summary |
static void |
main(java.lang.String[] args)
Main - Initializes the main window |
void |
run()
Main command line handler
Note: To add a command, add a command name and help string
using CommandInterface.addCommand() and then
implement the handler code below. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pCom
public CommandInterface pCom
COMMANDA
public int COMMANDA
COMMANDB
public int COMMANDB
QUIT
public int QUIT
MAX_INPUT
public static final int MAX_INPUT
PREFS_FILE
public static final java.lang.String PREFS_FILE
ComShell
public ComShell()
- Constructor - Initializes user-defined commands and environmental vars
main
public static void main(java.lang.String[] args)
- Main - Initializes the main window
run
public void run()
- Main command line handler
Note: To add a command, add a command name and help string
using CommandInterface.addCommand() and then
implement the handler code below. (See Constructor)