Class StreamingProcessOutput
- java.lang.Object
-
- com.github.fracpete.processoutput4j.output.AbstractProcessOutput
-
- com.github.fracpete.processoutput4j.output.StreamingProcessOutput
-
- All Implemented Interfaces:
java.io.Serializable
public class StreamingProcessOutput extends AbstractProcessOutput
Streams the data into the owningStreamingProcessOwnerobject.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected StreamingProcessOwnerm_Ownerthe owner.-
Fields inherited from class com.github.fracpete.processoutput4j.output.AbstractProcessOutput
m_Command, m_Environment, m_ExitCode, m_Process, m_ReaderStdErr, m_ReaderStdOut, m_RunnableTimeout, m_TimedOut, m_TimeOut
-
-
Constructor Summary
Constructors Constructor Description StreamingProcessOutput(StreamingProcessOwner owner)Initializes the process output with the specified owning object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractProcessReaderconfigureStdErr()Configures the thread for stderr.protected AbstractProcessReaderconfigureStdOut()Configures the thread for stdout.static voidmain(java.lang.String[] args)Allows the execution of a command through this process output scheme.-
Methods inherited from class com.github.fracpete.processoutput4j.output.AbstractProcessOutput
configureTimeOutMonitor, destroy, flush, getCommand, getEnvironment, getExitCode, getProcess, getTimeOut, hasSucceeded, hasTimedOut, initialize, monitor, monitor, monitor, monitor, monitor, setTimeOut, toString
-
-
-
-
Field Detail
-
m_Owner
protected StreamingProcessOwner m_Owner
the owner.
-
-
Constructor Detail
-
StreamingProcessOutput
public StreamingProcessOutput(StreamingProcessOwner owner)
Initializes the process output with the specified owning object.- Parameters:
owner- the owning object
-
-
Method Detail
-
configureStdErr
protected AbstractProcessReader configureStdErr()
Configures the thread for stderr.- Specified by:
configureStdErrin classAbstractProcessOutput- Returns:
- the configured thread, not yet started
-
configureStdOut
protected AbstractProcessReader configureStdOut()
Configures the thread for stdout.- Specified by:
configureStdOutin classAbstractProcessOutput- Returns:
- the configured thread, not yet started
-
main
public static void main(java.lang.String[] args) throws java.lang.ExceptionAllows the execution of a command through this process output scheme.- Parameters:
args- the command to launch- Throws:
java.lang.Exception- if launching fails for some reason
-
-