Interface CommandResult
- All Known Implementing Classes:
DefaultCommandResult
public interface CommandResult
Result of command execution.
Result is defined by:
Result is defined by:
- An exit status.
- Output.
- Status: success or failure.
-
Method Summary
Modifier and TypeMethodDescriptionint
Exit status.Command output.boolean
Check if command result is a failure.boolean
Check if command result is a success.
-
Method Details
-
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.
-