Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.log4j
Class ThreadedStreamGobbler

java.lang.Object
  extended by java.lang.Thread
      extended by org.nuxeo.log4j.ThreadedStreamGobbler
All Implemented Interfaces:
Runnable

public class ThreadedStreamGobbler
extends Thread

Helper class for logging process output

Since:
5.4.1

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
ThreadedStreamGobbler(InputStream is, int logLevel)
           
ThreadedStreamGobbler(InputStream inputStream, List<String> output)
           
ThreadedStreamGobbler(InputStream inputStream, OutputStream output)
           
 
Method Summary
 void 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadedStreamGobbler

public ThreadedStreamGobbler(InputStream is,
                             int logLevel)

ThreadedStreamGobbler

public ThreadedStreamGobbler(InputStream inputStream,
                             List<String> output)
Parameters:
inputStream - InputStream to read
output - List to store output instead of logging it.
Since:
5.4.3

ThreadedStreamGobbler

public ThreadedStreamGobbler(InputStream inputStream,
                             OutputStream output)
Parameters:
inputStream - InputStream to read
output - OutputStream where to write.
Since:
5.4.3
Method Detail

run

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

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.