abbot.util
Class ProcessOutputHandler

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--abbot.util.ProcessOutputHandler
All Implemented Interfaces:
Runnable

public class ProcessOutputHandler
extends Thread

Default process output handler, redirecting the subprocesses output to System.out and System.err. Override the handleOutput and handleError methods in order to get different results.


Fields inherited from class java.lang.Thread
inheritableThreadLocals, MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY, threadLocals
 
Constructor Summary
ProcessOutputHandler(Process p)
          Create an output handler for the given process.
ProcessOutputHandler(String name, Process p)
          Create an output handler for the given process.
 
Method Summary
protected  void handleError(byte[] buf, int len)
           
protected  void handleInput(byte[] buf, int len)
           
 void run()
           
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, 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
 

Constructor Detail

ProcessOutputHandler

public ProcessOutputHandler(Process p)
Create an output handler for the given process.

ProcessOutputHandler

public ProcessOutputHandler(String name,
                            Process p)
Create an output handler for the given process.
Method Detail

run

public void run()
Overrides:
run in class Thread

handleInput

protected void handleInput(byte[] buf,
                           int len)

handleError

protected void handleError(byte[] buf,
                           int len)


Copyright © 2002-2003 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge