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 ofHandlingResult
.exitCode()
Gets an exit code for thisHandlingResult
.boolean
isEmpty()
Indicate whether thisHandlingResult
does not have a result.boolean
Indicate whether thisHandlingResult
has a result.message()
Gets a message for thisHandlingResult
.static CommandHandlingResult
Gets an instance ofHandlingResult
.static CommandHandlingResult
Gets an instance ofHandlingResult
.
-
Method Details
-
message
Gets a message for thisHandlingResult
.- Returns:
- a message
-
exitCode
Integer exitCode()Gets an exit code for thisHandlingResult
. Exit code only has meaning if shell is in non-interactive mode.- Returns:
- an exit code
-
isPresent
boolean isPresent()Indicate whether thisHandlingResult
has a result.- Returns:
- true if result exist
-
isEmpty
boolean isEmpty()Indicate whether thisHandlingResult
does not have a result.- Returns:
- true if result doesn't exist
-
empty
Gets an empty instance ofHandlingResult
.- Returns:
- empty instance of
HandlingResult
-
of
Gets an instance ofHandlingResult
.- Parameters:
message
- the message- Returns:
- instance of
HandlingResult
-
of
Gets an instance ofHandlingResult
.- Parameters:
message
- the messageexitCode
- the exit code- Returns:
- instance of
HandlingResult
-