public interface SkbShell
extends HasPrompt
| Modifier and Type | Method and Description |
|---|---|
default void |
addCommandInterpreter(Collection<CommandInterpreter> interpreters)
Adds a new collection of command interpreters to the shell.
|
default boolean |
addCommandInterpreter(CommandInterpreter interpreter)
Adds a new command interpreter to the shell.
|
default void |
addCommandInterpreter(CommandInterpreter[] interpreters)
Adds a new set command interpreters to the shell.
|
List<String> |
getCommandHistory()
Returns the command history of the shell, that is the last n commands (n depends on implementation).
|
Map<String,CommandInterpreter> |
getCommandMap()
Returns the shell's mapping of commands to associated command interpreters.
|
Set<String> |
getCommands()
Returns all commands set for the shell.
|
default String |
getDescription()
Returns the description of the shell.
|
default String |
getDisplayName()
Returns the display name of the shell.
|
int |
getExitStatus()
Returns the exit status of the shell.
|
String |
getID()
Returns the identifier of the shell.
|
MessageMgr |
getMessageManager()
Returns the shell's message manager.
|
default String |
getPromptName()
Returns the prompt name of the shell.
|
boolean |
isRunning()
tests if the shell is running.
|
default int |
parseLine(String in)
Parses a command line string.
|
default StrBuilder |
prompt() |
int |
runShell()
Runs the shell.
|
int |
runShell(BufferedReader reader)
Runs the shell with a particular reader.
|
Thread |
start(Object notify)
Starts the shell as a new thread.
|
void |
stop()
Stops the shell thread.
|
default boolean addCommandInterpreter(CommandInterpreter interpreter)
interpreter - new command interpreterdefault void addCommandInterpreter(CommandInterpreter[] interpreters)
interpreters - new command interpreters, null array will be ignoreddefault void addCommandInterpreter(Collection<CommandInterpreter> interpreters)
interpreters - new command interpreters, null collection will be ignoreddefault String getDescription()
default String getDisplayName()
String getID()
default String getPromptName()
Map<String,CommandInterpreter> getCommandMap()
Set<String> getCommands()
default StrBuilder prompt()
prompt in interface HasPromptdefault int parseLine(String in)
in - command line string with a commandThread start(Object notify)
notify - an object to notify if the shell is terminatedvoid stop()
boolean isRunning()
int getExitStatus()
int runShell()
int runShell(BufferedReader reader)
reader - the reader for the shellMessageMgr getMessageManager()
Copyright © 2010–2017. All rights reserved.