com.bigdata.counters
Class ProcessReaderHelper
java.lang.Object
com.bigdata.counters.AbstractProcessReader
com.bigdata.counters.ProcessReaderHelper
- All Implemented Interfaces:
- Runnable
- Direct Known Subclasses:
- PIDStatCollector.PIDStatReader
public abstract class ProcessReaderHelper
- extends AbstractProcessReader
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
r
protected LineNumberReader r
- The
Reader from which the output of the process will be read.
ProcessReaderHelper
public ProcessReaderHelper()
start
public void start(InputStream is)
- Creates a
LineNumberReader from the InputStream.
- Overrides:
start in class AbstractProcessReader
- Parameters:
is - The input stream from which the output of the process will
be read.
getActiveProcess
protected abstract ActiveProcess getActiveProcess()
- Override to return the
ActiveProcess.
readLine
public String readLine()
throws IOException,
InterruptedException
- Returns the next line and blocks if a line is not available.
- Returns:
- The next line.
- Throws:
InterruptedException
IOException - if the source is closed.
InterruptedException - if the thread has been interrupted (this is
normal during shutdown).
run
public void run()
readProcess
protected abstract void readProcess()
throws Exception
- Responsible for reading the data.
- Throws:
Exception
Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.