Enum Class ErrorTypes
- All Implemented Interfaces:
Serializable,Comparable<ErrorTypes>,Constable
Represents general error types and how it should be treated.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the destination of input.static enumIndicating yield or penalize the processing when transfer the input.static classResult represents a result of a procedure.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe input was not ready for being processed.The input will be sent to the failure route for recovery without penalizing.Procedure setting has to be fixed, otherwise the same error would occur irrelevant to the input.The procedure is temporarily unavailable, usually due to the external service unavailability.The input was not processed successfully due to some temporal error related to the specifics of the input.It is unknown whether the error is persistent or temporal, related to the input or not. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ErrorTypes.Destinationprivate final ErrorTypes.Penalty -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateErrorTypes(ErrorTypes.Destination destination, ErrorTypes.Penalty penalty) -
Method Summary
Modifier and TypeMethodDescriptionpenalty()result()static ErrorTypesReturns the enum constant of this class with the specified name.static ErrorTypes[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PersistentFailure
Procedure setting has to be fixed, otherwise the same error would occur irrelevant to the input. In order to NOT call failing process frequently, this should be yielded. -
UnknownFailure
It is unknown whether the error is persistent or temporal, related to the input or not. -
InvalidInput
The input will be sent to the failure route for recovery without penalizing. Basically, the input should not be sent to the same procedure again unless the issue has been solved. -
TemporalFailure
The procedure is temporarily unavailable, usually due to the external service unavailability. Retrying maybe successful, but it should be yielded for a while. -
TemporalInputFailure
The input was not processed successfully due to some temporal error related to the specifics of the input. Retrying maybe successful, but it should be penalized for a while. -
Defer
The input was not ready for being processed. It will be kept in the incoming queue and also be penalized.
-
-
Field Details
-
destination
-
penalty
-
-
Constructor Details
-
ErrorTypes
-
-
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
-
result
-
destination
-
penalty
-