springs.util
Class ProcessExecutor.ReaderThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--springs.util.ProcessExecutor.ReaderThread
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
ProcessExecutor

class ProcessExecutor.ReaderThread
extends java.lang.Thread


Field Summary
private  java.io.BufferedReader _input
           
private  java.lang.String _linePrefix
           
private  int _numReadLines
           
private  java.lang.Object _object
           
private  java.lang.String _stringForEnd
           
private  java.lang.String _stringForStart
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ProcessExecutor.ReaderThread(java.lang.String linePrefix, java.io.InputStream is, java.lang.Object object, java.lang.String stringForStart, java.lang.String stringForEnd)
          Constructor.
 
Method Summary
 int getNumReadLines()
          Gets the number of lines read so far.
 void run()
          Main method.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_linePrefix

private java.lang.String _linePrefix

_input

private java.io.BufferedReader _input

_object

private java.lang.Object _object

_stringForStart

private java.lang.String _stringForStart

_stringForEnd

private java.lang.String _stringForEnd

_numReadLines

private int _numReadLines
Constructor Detail

ProcessExecutor.ReaderThread

public ProcessExecutor.ReaderThread(java.lang.String linePrefix,
                                    java.io.InputStream is,
                                    java.lang.Object object,
                                    java.lang.String stringForStart,
                                    java.lang.String stringForEnd)
Constructor.

Parameters:
linePrefix - a prefix that will be put before any output line.
is - the input stream.
object - the object that will be notified anytime something is read. Pass null if no notification is required.
stringForStart - the string that signals the start of the process.
stringForEnd - the string that signals the end of the process.
See Also:
String, InputStream, Object
Method Detail

getNumReadLines

public int getNumReadLines()
Gets the number of lines read so far.

Returns:
the number of lines read so far.

run

public void run()
Main method.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread