|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lsst.ccs.shell.Shell
public class Shell
Shell is the class interacting with user. Provides the command loop. All logic lies here.
| Nested Class Summary | |
|---|---|
static class |
Shell.Settings
|
| Field Summary | |
|---|---|
static String |
PROJECT_HOMEPAGE_URL
|
| Constructor Summary | |
|---|---|
Shell(Shell.Settings s,
CommandTable commandTable,
List<String> path)
Shell's constructor You probably don't need this one, see methods of the ShellFactory. |
|
| Method Summary | |
|---|---|
void |
addAuxHandler(Object handler,
String prefix)
This method is very similar to addMainHandler, except ShellFactory will pass all handlers registered with this method to all this shell's subshells. |
void |
addCompleter(jline.console.completer.Completer completer)
|
void |
addMainHandler(Object handler,
String prefix)
Method for registering command hanlers (or providers?) You call it, and from then the Shell has all commands declare in the handler object. |
void |
commandLoop()
Runs the command session. |
String |
getAppName()
|
CommandTable |
getCommandTable()
|
InputConversionEngine |
getInputConverter()
Call this method to get InputConversionEngine used by the Shell. |
Throwable |
getLastException()
Returns last thrown exception |
OutputConversionEngine |
getOutputConverter()
Call this method to get OutputConversionEngine used by the Shell. |
List<String> |
getPath()
|
Shell.Settings |
getSettings()
|
void |
processLine(String line)
You can operate Shell linewise, without entering the command loop. |
void |
setAppName(String appName)
Hint is some text displayed before the command loop and every time user enters "?". |
void |
setDisplayTime(boolean displayTime)
Turns command execution time display on and off |
void |
setSettings(Shell.Settings s)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static String PROJECT_HOMEPAGE_URL
| Constructor Detail |
|---|
public Shell(Shell.Settings s,
CommandTable commandTable,
List<String> path)
s - Settings object for the shell instancecommandTable - CommandTable to store commandspath - Shell's location: list of path elements.asg.cliche.ShellFactory| Method Detail |
|---|
public Shell.Settings getSettings()
public void setSettings(Shell.Settings s)
public CommandTable getCommandTable()
public OutputConversionEngine getOutputConverter()
public InputConversionEngine getInputConverter()
public void addMainHandler(Object handler,
String prefix)
handler - Object which should be registered as handler.prefix - Prefix that should be prepended to all handler's command names.asg.cliche.ShellDependent,
asg.cliche.ShellManageable
public void addAuxHandler(Object handler,
String prefix)
handler - Object which should be registered as handler.prefix - Prefix that should be prepended to all handler's command names.asg.cliche.Shell#addMainHandler(java.lang.Object, java.lang.String)public Throwable getLastException()
public List<String> getPath()
public void addCompleter(jline.console.completer.Completer completer)
public void commandLoop()
throws IOException
IOException - when can't readLine() from input.
public void processLine(String line)
throws CLIException
line - Full command line
asg.cliche.CLIException - This may be TokenException
CLIExceptionasg.cliche.Outputpublic void setDisplayTime(boolean displayTime)
displayTime - true if do display, false otherwisepublic void setAppName(String appName)
public String getAppName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||