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 an ExecCommand execution.
See Also:
  • Constructor Details

    • ExecResult

      public ExecResult(ExecCommand command, InputStream stdout, InputStream stderr, int exitValue)
      Creates a ExecResult instance.
      Parameters:
      command - A not-null reference of ExecCommand, that produced the result.
      stdout - InputStream with the stdout of the command executable. If there was no stdout, the value must be null.
      stderr - InputStream with the stderr of the command executable. If there was no stderr, the value must be null.
      exitValue - the exit value of the command executable.
  • Method Details

    • getCommand

      public ExecCommand getCommand()
      The executed command, that produced this result. The returned object is never null.
      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 or null, 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 or null, if no output was produced in the stderr.
      Returns:
      The standart error output (stderr) of the command executable.