- All Implemented Interfaces:
- public class ConsoleThread
- extends Object
- implements Runnable
Untamed: Implements a seperate thread to manage the user console (i.e., the keyboard
and tty). This needs to be in its own thread so that the user pondering
what to type next doesn't block the entire E runQ!
The console is given an input handler when it is created, which is an object
that implements the ConsoleInputHandler interface. Each line of input typed
on the console is sent as a String in an E-message to the input handler. End
of file is signalled to the input handler by sending it a null. If a
problem is thrown while reading, the handler is asked to handle it as well.
Enabled: This is the actual thread code for the ConsoleThread.
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
private final Object myLock
private final ConsoleInputHandler myHandler
private BufferedReader myIn
private PrintWriter myOptOut
private boolean nowait
- Constructs a new console object given a handler and the console input
and output, then starts the thread.
handler - The E object that is to receive input lines.
in - The console input source.
public void run()
- Enabled: This is the actual thread code for the ConsoleThread.
- Specified by:
run in interface
- See Also: