org.glassfish.embeddable
Interface CommandResult


public interface CommandResult

Encapsulates the result of a command invoked using CommandRunner.run(java.lang.String, java.lang.String...).


Nested Class Summary
static class CommandResult.ExitStatus
          A command can have following types of exit status.
 
Method Summary
 CommandResult.ExitStatus getExitStatus()
           
 java.lang.Throwable getFailureCause()
          This method returns any exception raised during command invocation, If the command's exit status is CommandResult.ExitStatus.SUCCESS, then this method will return null.
 java.lang.String getOutput()
           
 

Method Detail

getExitStatus

CommandResult.ExitStatus getExitStatus()
Returns:
exit status of the command

getOutput

java.lang.String getOutput()
Returns:
command output

getFailureCause

java.lang.Throwable getFailureCause()
This method returns any exception raised during command invocation, If the command's exit status is CommandResult.ExitStatus.SUCCESS, then this method will return null.

Returns:
any exception that occurred during this command execution.