Package org.apache.camel.component.exec
Class ExecResult
- java.lang.Object
-
- org.apache.camel.component.exec.ExecResult
-
- All Implemented Interfaces:
Serializable
public class ExecResult extends Object implements Serializable
Value object, that represents the result of anExecCommand
execution.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExecResult(ExecCommand command, InputStream stdout, InputStream stderr, int exitValue)
Creates aExecResult
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecCommand
getCommand()
The executed command, that produced this result.int
getExitValue()
The exit value of the command executable.InputStream
getStderr()
Returns the content of the standart error output (stderr) of the executed command ornull
, if no output was produced in the stderr.InputStream
getStdout()
Returns the content of the standart output (stdout) of the executed command ornull
, if no output was produced in the stdout.
-
-
-
Constructor Detail
-
ExecResult
public ExecResult(ExecCommand command, InputStream stdout, InputStream stderr, int exitValue)
Creates aExecResult
instance.- Parameters:
command
- A not-null reference ofExecCommand
, that produced the result.stdout
- InputStream with the stdout of the command executable. If there was no stdout, the value must benull
.stderr
- InputStream with the stderr of the command executable. If there was no stderr, the value must benull
.exitValue
- the exit value of the command executable.
-
-
Method Detail
-
getCommand
public ExecCommand getCommand()
The executed command, that produced this result. The returned object is nevernull
.- Returns:
- The executed command, that produced this result.
-
getExitValue
public int getExitValue()
The exit value of the command executable.- Returns:
- The exit value of the command executable
-
getStdout
public InputStream getStdout()
Returns the content of the standart output (stdout) of the executed command ornull
, if no output was produced in the stdout.- Returns:
- The standart output (stdout) of the command executable.
-
getStderr
public InputStream getStderr()
Returns the content of the standart error output (stderr) of the executed command ornull
, if no output was produced in the stderr.- Returns:
- The standart error output (stderr) of the command executable.
-
-