com.bluemarsh.jswat.ui
Class ConsoleAdapter.ConsoleInputAdapter

java.lang.Object
  |
  +--com.bluemarsh.jswat.ui.ConsoleAdapter.ConsoleInputAdapter
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
ConsoleAdapter

protected class ConsoleAdapter.ConsoleInputAdapter
extends java.lang.Object
implements java.lang.Runnable

Class ConsoleInputAdapter adapts the standard input stream to the CommandManager.

Author:
Nathan Fiedler

Field Summary
protected  CommandManager commandManager
          Where input is sent.
protected  java.io.BufferedReader inputReader
          Where input comes from.
 
Constructor Summary
ConsoleAdapter.ConsoleInputAdapter(java.io.InputStream input, CommandManager cmdman)
          Constructs a ConsoleInputAdapter to read from the given input stream and send the input to the given command manager.
 
Method Summary
 void run()
          Read from the input stream and send the input to the command manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandManager

protected CommandManager commandManager
Where input is sent.

inputReader

protected java.io.BufferedReader inputReader
Where input comes from.
Constructor Detail

ConsoleAdapter.ConsoleInputAdapter

public ConsoleAdapter.ConsoleInputAdapter(java.io.InputStream input,
                                          CommandManager cmdman)
Constructs a ConsoleInputAdapter to read from the given input stream and send the input to the given command manager.
Parameters:
input - input stream.
cmdman - CommandManager to send input to.
Method Detail

run

public void run()
Read from the input stream and send the input to the command manager.
Specified by:
run in interface java.lang.Runnable