Enum Class HandleResult
- All Implemented Interfaces:
Serializable,Comparable<HandleResult>,Constable
Represents the result of a parameter handler execution,
controlling chain flow with results per handler per iteration.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates an error occurred during handlingProceeds to the next handler in the chainContinues to the next iteration of the main loopTerminates the handler chain execution -
Method Summary
Modifier and TypeMethodDescriptionstatic HandleResultfailure(ImperatException exception) Creates a failure result with the specified exception.@Nullable ImperatExceptionGets the exception associated with this result.static HandleResultReturns the enum constant of this class with the specified name.static HandleResult[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TERMINATE
Terminates the handler chain execution -
NEXT_ITERATION
Continues to the next iteration of the main loop -
NEXT_HANDLER
Proceeds to the next handler in the chain -
FAILURE
Indicates an error occurred during handling
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
failure
Creates a failure result with the specified exception.- Parameters:
exception- the exception that caused the failure- Returns:
- a FAILURE result containing the exception
-
getException
Gets the exception associated with this result.- Returns:
- the exception if this is a FAILURE result, null otherwise
-