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 ofCommandHandlingResult.exitCode()Gets an exit code for thisCommandHandlingResult.booleanisEmpty()Indicate whether thisCommandHandlingResultdoes not have a result.booleanIndicate whether thisCommandHandlingResulthas a result.message()Gets a message for thisCommandHandlingResult.static CommandHandlingResultGets an instance ofCommandHandlingResult.static CommandHandlingResultGets 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 thisCommandHandlingResulthas a result.- Returns:
- true if result exist
-
isEmpty
boolean isEmpty()Indicate whether thisCommandHandlingResultdoes 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
-