rescuecore.tools.simulationrunner
Class LogReader

java.lang.Object
  extended byrescuecore.tools.simulationrunner.LogReader
All Implemented Interfaces:
java.lang.Runnable

public class LogReader
extends java.lang.Object
implements java.lang.Runnable


Constructor Summary
LogReader(java.io.InputStream in)
          Generate a new LogReader that reads from the given InputStream
LogReader(java.io.InputStream in, java.io.OutputStream log)
          Generate a new LogReader that reads from the given InputStream and writes to the given OutputStream
 
Method Summary
 void addOutputStream(java.io.OutputStream stream)
          Add a new destination for the data
 void kill()
          Shut down this LogReader
 void run()
           
 void start()
          Start this LogReader
 void start(java.lang.String waitFor, RescueProcess process)
          Start this LogReader and wait for a particular String to appear in the output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogReader

public LogReader(java.io.InputStream in,
                 java.io.OutputStream log)
Generate a new LogReader that reads from the given InputStream and writes to the given OutputStream

Parameters:
in - The InputStream to read
log - An OutputStream to write to

LogReader

public LogReader(java.io.InputStream in)
Generate a new LogReader that reads from the given InputStream

Parameters:
in - The InputStream to read
Method Detail

addOutputStream

public void addOutputStream(java.io.OutputStream stream)
Add a new destination for the data

Parameters:
stream - The new destination for data.

kill

public void kill()
Shut down this LogReader


start

public void start()
Start this LogReader


start

public void start(java.lang.String waitFor,
                  RescueProcess process)
Start this LogReader and wait for a particular String to appear in the output. This method will block until that message appears

Parameters:
waitFor - The message to wait for
process - The RescueProcess that controls this LogReader

run

public void run()
Specified by:
run in interface java.lang.Runnable