|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
de.uniba.wiai.lspi.util.console.ConsoleThread
public class ConsoleThread
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Method Summary | |
|---|---|
CommandFactory |
getCommandFactory()
Get a reference to the CommandFactory used by this console. |
static ConsoleThread |
getConsole()
Method to obtain a reference to the console currently active in this JVM. |
static ConsoleThread |
getConsole(java.lang.String name,
CommandFactory factory)
Factory method to get a reference to the console singleton. |
static ConsoleThread |
getConsole(java.lang.String name,
CommandFactory factory,
java.io.OutputStream systemOut)
Factory method to create a console. |
java.io.PrintStream |
getPrintStream()
Get a reference to the PrintStream this console prints its output
to. |
java.io.OutputStream |
getSystemOutputStream()
Get a reference to the OutputStream calls to System.out are
delegated to. |
void |
run()
The run method. |
void |
setExitCommand(java.lang.String commandName)
Set the Command that exits this console. |
void |
setWelcomeText(java.lang.String text)
Set a costum welcome text for the console. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static ConsoleThread getConsole()
null, if there is none.
public static ConsoleThread getConsole(java.lang.String name,
CommandFactory factory)
name - factory -
public static ConsoleThread getConsole(java.lang.String name,
CommandFactory factory,
java.io.OutputStream systemOut)
name - factory - systemOut -
public java.io.PrintStream getPrintStream()
PrintStream this console prints its output
to.
PrintStream this console prints its
output to.public java.io.OutputStream getSystemOutputStream()
OutputStream calls to System.out are
delegated to. Returns null if System.out has not been
redirected.
OutputStream calls to System.out are
delegated to. Returns null if System.out has not
been redirected.public CommandFactory getCommandFactory()
CommandFactory used by this console.
CommandFactory used by this console.public void setWelcomeText(java.lang.String text)
text - The welcome text to set.public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
public void setExitCommand(java.lang.String commandName)
throws ConsoleException
Command that exits this console. Uses the
CommandFactory to create an instance of the Command.
commandName - The name of the command.
ConsoleException - Exception during creation of the command.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||