org.apache.camel.component.exec
Class ExecResult

java.lang.Object
  extended by 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:
Serialized Form

Constructor Summary
ExecResult(ExecCommand command, InputStream stdout, InputStream stderr, int exitValue)
          Creates a ExecResult instance.
 
Method Summary
 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 or null, if no output was produced in the stderr.
 InputStream getStdout()
          Returns the content of the standart output (stdout) of the executed command or null, if no output was produced in the stdout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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.


Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.