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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getExitStatus()
Exit status.String
getOutput()
Command output.boolean
isFailure()
Check if command result is a failure.boolean
isSuccess()
Check if command result is a success.
-
-
-
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.
-
-