public class CLIDriver extends Object
Created by Jeff Gaynor
on 5/17/13 at 3:01 PM
Modifier and Type | Field and Description |
---|---|
static int |
ABNORMAL_RC |
static String |
CLEAR_COMMAND |
protected static int |
EXECUTE_COMMAND |
static String |
EXIT_COMMAND
If a user enters this string at any point, the current operation should end.
|
static int |
HELP_RC |
protected static int |
HISTORY_COMMAND |
static String |
HISTORY_LIST_COMMAND |
protected static int |
NEW_COMMAND |
static int |
OK_RC |
protected static int |
REPEAT_COMMAND |
static String |
REPEAT_LAST_COMMAND |
static int |
SHUTDOWN_RC |
static int |
USER_EXIT_RC |
Modifier and Type | Method and Description |
---|---|
int |
execute(String cmdLine) |
int |
execute(String[] cmds)
So that various other programs can call this as needed
|
int |
execute(Vector cmdV)
Returns a logical true if one of the command lines executes the line successfully.
|
BufferedReader |
getBufferedReader() |
Commands[] |
getCLICommands() |
protected int |
getCommandType(String cmdLine) |
Map |
getEnv() |
boolean |
hasEnv() |
protected void |
listCLIMethods() |
void |
quit(InputLine inputLine) |
protected String |
readline() |
protected void |
say(String x)
For use with informational messages.
|
protected void |
say2(String x)
For use with prompts.
|
void |
setBufferedReader(BufferedReader bufferedReader) |
protected void |
setCLICommands(Commands[] commands) |
void |
setEnv(Map env) |
protected void |
shutdown() |
void |
start()
Actual method that starts up this driver and sets out prompts etc.
|
public static final String EXIT_COMMAND
public static final String CLEAR_COMMAND
public static final int OK_RC
public static final int ABNORMAL_RC
public static final int USER_EXIT_RC
public static final int SHUTDOWN_RC
public static final int HELP_RC
public static final String REPEAT_LAST_COMMAND
public static final String HISTORY_LIST_COMMAND
protected static final int NEW_COMMAND
protected static final int REPEAT_COMMAND
protected static final int HISTORY_COMMAND
protected static final int EXECUTE_COMMAND
public CLIDriver(Commands... cci)
public Map getEnv()
public void setEnv(Map env)
public boolean hasEnv()
public Commands[] getCLICommands()
protected void setCLICommands(Commands[] commands)
public void setBufferedReader(BufferedReader bufferedReader)
public BufferedReader getBufferedReader()
protected String readline() throws IOException
IOException
protected int getCommandType(String cmdLine)
public void start()
Exception
public int execute(String[] cmds)
cmds
- public int execute(String cmdLine)
public int execute(Vector cmdV)
cmdV
- protected void listCLIMethods()
public void quit(InputLine inputLine)
protected void shutdown()
protected void say(String x)
x
- protected void say2(String x)
x
- Copyright © 2019. All Rights Reserved.