wt.util
Class ProcessLauncher.PrintStreamSpewer
java.lang.Object
java.lang.Thread
wt.util.ProcessLauncher.PrintStreamSpewer
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- ProcessLauncher
- private class ProcessLauncher.PrintStreamSpewer
- extends Thread
Thread to read from an input stream (line-by-line) and print it to a print stream until the input stream closes.
Method Summary |
void |
run()
Worker component of the thread. |
void |
safeJoin()
Wait for the spewer thread to complete. |
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 |
inputStream_
private final InputStream inputStream_
writer_
private final PrintWriter writer_
inactivityTimeout_
private long inactivityTimeout_
overallStopTime_
private long overallStopTime_
ProcessLauncher.PrintStreamSpewer
ProcessLauncher.PrintStreamSpewer(InputStream input_stream,
PrintStream print_stream)
- Create the instance that reads from the specified InputStream and writes to the provided PrintStream.
- Parameters:
input_stream
- The process' InputStream.print_stream
- The Output for the user.
ProcessLauncher.PrintStreamSpewer
ProcessLauncher.PrintStreamSpewer(InputStream input_stream,
PrintWriter writer)
- Create the instance that reads from the specified InputStream and writes to the provided PrintWriter.
- Parameters:
input_stream
- The process' InputStream.writer
- The Output for the user.
run
public void run()
- Worker component of the thread.
safeJoin
public void safeJoin()
- Wait for the spewer thread to complete.
Will not return until the thread is complete even if the client thread is interrupted.