Interface CommandHandlingResult
- All Known Implementing Classes:
CommandHandlingResult.DefaultHandlingResult
public interface CommandHandlingResult
Holder for handling some processing, typically with
CommandExceptionResolver
.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CommandHandlingResult
empty()
Gets an empty instance ofCommandHandlingResult
.exitCode()
Gets an exit code for thisCommandHandlingResult
.boolean
isEmpty()
Indicate whether thisCommandHandlingResult
does not have a result.boolean
Indicate whether thisCommandHandlingResult
has a result.message()
Gets a message for thisCommandHandlingResult
.static CommandHandlingResult
Gets an instance ofCommandHandlingResult
.static CommandHandlingResult
Gets an instance ofCommandHandlingResult
.
-
Method Details
-
message
Gets a message for thisCommandHandlingResult
.- Returns:
- a message
-
exitCode
Integer exitCode()Gets an exit code for thisCommandHandlingResult
. Exit code only has meaning if shell is in non-interactive mode.- Returns:
- an exit code
-
isPresent
boolean isPresent()Indicate whether thisCommandHandlingResult
has a result.- Returns:
- true if result exist
-
isEmpty
boolean isEmpty()Indicate whether thisCommandHandlingResult
does not have a result.- Returns:
- true if result doesn't exist
-
empty
Gets an empty instance ofCommandHandlingResult
.- Returns:
- empty instance of
CommandHandlingResult
-
of
Gets an instance ofCommandHandlingResult
.- Parameters:
message
- the message- Returns:
- instance of
CommandHandlingResult
-
of
Gets an instance ofCommandHandlingResult
.- Parameters:
message
- the messageexitCode
- the exit code- Returns:
- instance of
CommandHandlingResult
-