Package org.apache.camel.component.exec
Class ExecResult
java.lang.Object
org.apache.camel.component.exec.ExecResult
- All Implemented Interfaces:
Serializable
Value object, that represents the result of an
ExecCommand
execution.- See Also:
-
Constructor Summary
ConstructorDescriptionExecResult
(ExecCommand command, InputStream stdout, InputStream stderr, int exitValue) Creates aExecResult
instance. -
Method Summary
Modifier and TypeMethodDescriptionThe executed command, that produced this result.int
The exit value of the command executable.Returns the content of the standart error output (stderr) of the executed command ornull
, if no output was produced in the stderr.Returns the content of the standart output (stdout) of the executed command ornull
, if no output was produced in the stdout.
-
Constructor Details
-
ExecResult
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 Details
-
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
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
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.
-