org.rhq.core.system
Class ProcessExecutionResults

java.lang.Object
  extended by org.rhq.core.system.ProcessExecutionResults

public class ProcessExecutionResults
extends Object

Encapsulates the results of a process that was executed via SystemInfo.executeProcess(ProcessExecution).


Constructor Summary
ProcessExecutionResults()
           
 
Method Summary
 String getCapturedOutput()
          Returns the full output of the process (stdout plus stderr) as a String.
 Throwable getError()
          An error that occurred, typically due to a startup failure.
 Integer getExitCode()
          If the process finished, this is its exit code.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProcessExecutionResults

public ProcessExecutionResults()
Method Detail

getExitCode

public Integer getExitCode()
If the process finished, this is its exit code. Its numeric value has specific meaning that is custom to the operating system and the program that was executed.

This will be null if the process was never waited on or if the wait time expired before the process exited.

Returns:
process exit code or null if it could not be determined
See Also:
SystemInfo.executeProcess(ProcessExecution)

getError

public Throwable getError()
An error that occurred, typically due to a startup failure.

Returns:
error that occurred while starting the process; null if no known error occurred

getCapturedOutput

public String getCapturedOutput()
Returns the full output of the process (stdout plus stderr) as a String. This returns null if the process's output was not captured.

Returns:
the full output of the process (stdout plus stderr) or null

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2009 RHQ Project Advisory Board (Red Hat, Inc.). All Rights Reserved.