public class ProcessResult
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ProcessResult.Status
Status of a process' execution.
|
Modifier and Type | Field and Description |
---|---|
private int |
exitCode
The exit code of the process.
|
private ProcessResult.Status |
status
Status of the process' execution.
|
Constructor and Description |
---|
ProcessResult(int exitCode,
ProcessResult.Status status)
Constructor for ProcessResult.
|
ProcessResult(ProcessResult.Status status)
Instantiates a process result with the given status and an exit code of
-1 . |
Modifier and Type | Method and Description |
---|---|
int |
getExitCode()
Get exit code of the process.
|
ProcessResult.Status |
getStatus()
Get the status of the process' execution.
|
boolean |
isExecutedWithError()
Whether the execution occurred and resulted in an error
|
private final int exitCode
private final ProcessResult.Status status
public ProcessResult(ProcessResult.Status status)
-1
.status
- Status describing the execution of the external process.public ProcessResult(int exitCode, ProcessResult.Status status)
Constructor for ProcessResult.
exitCode
- Exit code of the process.status
- Status describing the execution of the external process.public int getExitCode()
public ProcessResult.Status getStatus()
public boolean isExecutedWithError()
true
if the execution occurred and resulted in a
return code different from 0, false
otherwise.