ParkNPark.tests
Class ServerInputCopier

java.lang.Object
  extended by java.lang.Thread
      extended by ParkNPark.tests.InputCopier
          extended by ParkNPark.tests.ServerInputCopier
All Implemented Interfaces:
Runnable

 class ServerInputCopier
extends InputCopier

Copies server input and specially handles the input lines, looking for patterns that signal certain events


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  ProcessInfo processInfo
           
 
Fields inherited from class ParkNPark.tests.InputCopier
reader, writer
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ServerInputCopier(ProcessInfo processInfo, Reader reader, Writer writer)
           
 
Method Summary
protected  void processingFinished()
          Called when the processing finishes, just before the reader and writer are closed
protected  String processLine(String line)
          Processes the given line and returns the line that should be written to the writer or null if the copier should stop copying
 
Methods inherited from class ParkNPark.tests.InputCopier
closeReader, closeWriter, lineProcessed, run
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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

processInfo

protected ProcessInfo processInfo
Constructor Detail

ServerInputCopier

public ServerInputCopier(ProcessInfo processInfo,
                         Reader reader,
                         Writer writer)
Method Detail

processLine

protected String processLine(String line)
Description copied from class: InputCopier
Processes the given line and returns the line that should be written to the writer or null if the copier should stop copying

Overrides:
processLine in class InputCopier
Parameters:
line - The line returned from the reader
Returns:
The line to write to the writer or null if the copier should stop copying

processingFinished

protected void processingFinished()
Description copied from class: InputCopier
Called when the processing finishes, just before the reader and writer are closed

Overrides:
processingFinished in class InputCopier