org.jboss.ejb3.common.thread
Class RedirectProcessOutputThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.jboss.ejb3.common.thread.RedirectProcessOutputThread
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
RedirectProcessOutputToSystemOutThread

public class RedirectProcessOutputThread
extends Thread
implements Runnable

RedirectProcessOutputThread Captures output from a Process and redirects to a specified PrintStream

Version:
$Revision: $
Author:
ALR

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
RedirectProcessOutputThread(Process process, PrintStream printStream)
          Constructor
 
Method Summary
 PrintStream getPrintStream()
           
 Process getProcess()
           
 void run()
           
 void setPrintStream(PrintStream printStream)
           
 void setProcess(Process process)
           
 
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

RedirectProcessOutputThread

public RedirectProcessOutputThread(Process process,
                                   PrintStream printStream)
Constructor

Parameters:
process - The Process whose output to capture
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

getProcess

public Process getProcess()

setProcess

public void setProcess(Process process)

getPrintStream

public PrintStream getPrintStream()

setPrintStream

public void setPrintStream(PrintStream printStream)


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.