|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.alicebot.server.core.util.Shell
public class Shell
Provides a simple shell for interacting with the bot at a command line (was originally in Graphmaster).
Field Summary | |
---|---|
static java.lang.String |
PROMPT
The string to use for an interactive console. |
static java.lang.String |
SHELL
Flag for a line in an interactive shell. |
Constructor Summary | |
---|---|
Shell()
A Shell with default input and output streams
(System.in and System.out ). |
|
Shell(java.io.InputStream in,
java.io.PrintStream display,
java.io.PrintStream prompt)
A Shell with custom input and output streams. |
Method Summary | |
---|---|
java.lang.String |
getCurrentBotID()
|
void |
help()
Prints help text. |
void |
listBotFiles()
Prints a list of files loaded by the current bot. |
void |
load(java.lang.String line,
java.lang.String botid)
Loads a given file for a given bot. |
void |
rollChatLog(java.lang.String botid)
Rolls over the chat log file. |
void |
rollTargets()
Rolls over the targets data file. |
void |
run()
Runs the shell. |
void |
showBotList()
Shows a list of active bots. |
void |
switchToBot(java.lang.String newBotID)
Switches to a bot, given an id. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROMPT
public static final java.lang.String SHELL
Constructor Detail |
---|
public Shell()
Shell
with default input and output streams
(System.in
and System.out
).
public Shell(java.io.InputStream in, java.io.PrintStream display, java.io.PrintStream prompt)
Shell
with custom input and output streams.
in
- the input streamdisplay
- the display output streamprompt
- the prompt output streamMethod Detail |
---|
public void run()
public java.lang.String getCurrentBotID()
public void help()
public void load(java.lang.String line, java.lang.String botid)
public void showBotList()
public void switchToBot(java.lang.String newBotID)
newBotID
- public void listBotFiles()
public void rollChatLog(java.lang.String botid)
public void rollTargets()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |