Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.textflex.txtfl
Class InputRetriever  view InputRetriever download InputRetriever.java

java.lang.Object
  extended bycom.textflex.txtfl.InputRetriever
All Implemented Interfaces:
java.lang.Runnable

class InputRetriever
extends java.lang.Object
implements java.lang.Runnable

Solicits user command-line input on an independent thread.


Field Summary
(package private)  java.lang.String input
           
(package private)  java.io.BufferedReader reader
           
private  java.lang.Thread thread
           
 
Constructor Summary
InputRetriever()
           
 
Method Summary
 java.lang.String getInput()
          Gets the input value.
 void run()
          Requests user command-line input.
 void setInput(java.lang.String aInput)
          Sets the input value.
 void start(java.io.BufferedReader aReader)
          Starts the thread.
 void stop()
          Stops the thread and resets the input value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

thread

private java.lang.Thread thread

reader

java.io.BufferedReader reader

input

java.lang.String input
Constructor Detail

InputRetriever

public InputRetriever()
Method Detail

start

public void start(java.io.BufferedReader aReader)
Starts the thread.


run

public void run()
Requests user command-line input. Does not exit until the user hits "Return".

Specified by:
run in interface java.lang.Runnable

stop

public void stop()
Stops the thread and resets the input value.


getInput

public java.lang.String getInput()
Gets the input value.


setInput

public void setInput(java.lang.String aInput)
Sets the input value.