Class StreamingProcessReader
- java.lang.Object
-
- com.github.fracpete.processoutput4j.core.AbstractProcessRunnable
-
- com.github.fracpete.processoutput4j.reader.AbstractProcessReader
-
- com.github.fracpete.processoutput4j.reader.StreamingProcessReader
-
- All Implemented Interfaces:
java.lang.Runnable
public class StreamingProcessReader extends AbstractProcessReader
Forwards the output from the process to the owningStreamingProcessOwnerobject, if appropriate.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_Forwardwhether to forward the output to the owner.protected StreamingProcessOwnerm_Ownerthe owner.-
Fields inherited from class com.github.fracpete.processoutput4j.reader.AbstractProcessReader
m_Reader, m_Stdout
-
Fields inherited from class com.github.fracpete.processoutput4j.core.AbstractProcessRunnable
m_Process, m_Queue, m_Stopped
-
-
Constructor Summary
Constructors Constructor Description StreamingProcessReader(StreamingProcessOwner owner, boolean stdout)Initializes the reader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidprocess(java.lang.String line)For processing the line read from stdout/stderr.-
Methods inherited from class com.github.fracpete.processoutput4j.reader.AbstractProcessReader
doRun, flush, isStdout
-
Methods inherited from class com.github.fracpete.processoutput4j.core.AbstractProcessRunnable
getProcess, isStopped, logError, logError, run, setProcess, stopExecution
-
-
-
-
Field Detail
-
m_Owner
protected StreamingProcessOwner m_Owner
the owner.
-
m_Forward
protected boolean m_Forward
whether to forward the output to the owner.
-
-
Constructor Detail
-
StreamingProcessReader
public StreamingProcessReader(StreamingProcessOwner owner, boolean stdout)
Initializes the reader.- Parameters:
owner- the owning objectstdout- whether to read stdout or stderr
-
-
Method Detail
-
process
protected void process(java.lang.String line)
For processing the line read from stdout/stderr.- Specified by:
processin classAbstractProcessReader- Parameters:
line- the output line
-
-