Enum Class PropagatingErrorHandler
- All Implemented Interfaces:
Serializable,Comparable<PropagatingErrorHandler>,Constable,ErrorHandler
ErrorHandler implementation that rethrows the ErrorContext exception.- Since:
- 3.0.0
- Author:
- Rene de Waele
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleError(ErrorContext errorContext) Handle an error raised during event processing.static PropagatingErrorHandlerinstance()Singleton instance of aPropagatingErrorHandler.static PropagatingErrorHandlerReturns the enum constant of this class with the specified name.static PropagatingErrorHandler[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
Singleton instance of aPropagatingErrorHandler.
-
-
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
-
instance
Singleton instance of aPropagatingErrorHandler.- Returns:
- The singleton instance of
PropagatingErrorHandler
-
handleError
Description copied from interface:ErrorHandlerHandle an error raised during event processing.Generally this means that the
ProcessingContextcreated to coordinate the event processing was rolled back. Using default configuration theErrorHandleris only invoked when there is a serious error, for instance when the database transaction connected to theProcessingContextcan not be committed.The error handler has the option to simply log or ignore the error. Depending on the type of
EventProcessorthis will put an end to the processing of any further events (in case of aPooledStreamingEventProcessor) or simply skip over the list offailedEventsin the givenerrorContext.Note that although the
ProcessingContextand hence any related database transactions have been rolled back when the error handler is invoked, the processing of one or more of theErrorContext.failedEvents()may in fact have caused other side effects which could not be reverted.- Specified by:
handleErrorin interfaceErrorHandler- Parameters:
errorContext- Contextual information describing the error.- Throws:
Exception- If this handler decides to propagate the error.
-