Interface CommandResult

  • All Known Implementing Classes:
    DefaultCommandResult

    public interface CommandResult
    Result of command execution.
    Result is defined by:
    • An exit status.
    • Output.
    • Status: success or failure.
    Most of the time, success and failure may be guess using exit status, but this may more complex.
    • Method Detail

      • getExitStatus

        int getExitStatus()
        Exit status.
        Returns:
        Exit status.
      • isSuccess

        boolean isSuccess()
        Check if command result is a success. When command is a success, then it must not be a failure.
        Returns:
        true if command is a success, false otherwise.
      • isFailure

        boolean isFailure()
        Check if command result is a failure. When command is a failure, then it must not be a success.
        Returns:
        true if command is a failure, false otherwise.
      • getOutput

        String getOutput()
        Command output.
        Returns:
        Output.