class BatchProcess extends java.lang.Object implements Process
InteractiveProcess
to emulate a batch process.Modifier and Type | Field and Description |
---|---|
private InteractiveProcess |
process |
private StreamForwarder |
stderrForwarder |
private StreamForwarder |
stdinForwarder |
private StreamForwarder |
stdoutForwarder |
private static long |
TERMINATION_DELAY
Time to wait for a StreamForwarder to terminate (in ms.)
|
Constructor and Description |
---|
BatchProcess(Files files,
Path workingDirectory,
JobImplementation job,
InteractiveProcessFactory factory) |
Modifier and Type | Method and Description |
---|---|
private void |
closeStreams() |
private java.io.OutputStream |
createOutputStream(Files files,
Path workdir,
java.lang.String filename) |
void |
destroy() |
int |
getExitStatus() |
boolean |
isDone() |
private Path |
processPath(Files files,
Path root,
java.lang.String path) |
private static final long TERMINATION_DELAY
private final InteractiveProcess process
private StreamForwarder stdinForwarder
private StreamForwarder stdoutForwarder
private StreamForwarder stderrForwarder
public BatchProcess(Files files, Path workingDirectory, JobImplementation job, InteractiveProcessFactory factory) throws XenonException, java.io.IOException
XenonException
java.io.IOException
private Path processPath(Files files, Path root, java.lang.String path) throws XenonException
XenonException
private java.io.OutputStream createOutputStream(Files files, Path workdir, java.lang.String filename) throws XenonException
XenonException
private void closeStreams()
public int getExitStatus()
getExitStatus
in interface Process