Interface CommandHandlingResult
- All Known Implementing Classes:
CommandHandlingResult.DefaultHandlingResult
public interface CommandHandlingResult
Holder for handling some processing, typically with
CommandExceptionResolver.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic CommandHandlingResultempty()Gets an empty instance ofHandlingResult.exitCode()Gets an exit code for thisHandlingResult.booleanisEmpty()Indicate whether thisHandlingResultdoes not have a result.booleanIndicate whether thisHandlingResulthas a result.message()Gets a message for thisHandlingResult.static CommandHandlingResultGets an instance ofHandlingResult.static CommandHandlingResultGets 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 thisHandlingResulthas a result.- Returns:
- true if result exist
-
isEmpty
boolean isEmpty()Indicate whether thisHandlingResultdoes 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
-