org.eclipse.actf.validation.javapp.launch
Class RuntimeStreamHandlerThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.eclipse.actf.validation.javapp.launch.RuntimeStreamHandlerThread
All Implemented Interfaces:
Runnable

public class RuntimeStreamHandlerThread
extends Thread

used to process standard error and standard out streams when running a distinct process.

Author:
Mike Squillace

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
RuntimeStreamHandlerThread(InputStream is, IReporter dest, boolean isErrorStream)
          create a thread to process stderr/stdout from a separate process
RuntimeStreamHandlerThread(InputStream is, IReporter dest, boolean isErrorStream, ValidationLauncher launcher)
          create a thread to process stderr/stdout from a separate process
 
Method Summary
 PrintWriter getDebugWriter()
          return the write for debugging
 void run()
          
 void setDebugWriter(PrintWriter writer)
          set a writer for debugging.
 void setUseAllOutput(boolean output)
           
 
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
 

Constructor Detail

RuntimeStreamHandlerThread

public RuntimeStreamHandlerThread(InputStream is,
                                  IReporter dest,
                                  boolean isErrorStream)
create a thread to process stderr/stdout from a separate process

Parameters:
is - - input stream from process
dest - - destination
isErrorStream - - if this is an error stream from a process

RuntimeStreamHandlerThread

public RuntimeStreamHandlerThread(InputStream is,
                                  IReporter dest,
                                  boolean isErrorStream,
                                  ValidationLauncher launcher)
create a thread to process stderr/stdout from a separate process

Parameters:
is - - input stream from process
dest - - destination
isErrorStream - - if this is an error stream from a process
launcher - - callbacks to launcher to update launch events
Method Detail

setDebugWriter

public void setDebugWriter(PrintWriter writer)
set a writer for debugging. All contents of all streams are sent to this stream if set.

Parameters:
writer - - destination for debugging

getDebugWriter

public PrintWriter getDebugWriter()
return the write for debugging

Returns:
writer being used for debugging

setUseAllOutput

public void setUseAllOutput(boolean output)

run

public void run()

Specified by:
run in interface Runnable
Overrides:
run in class Thread