Class ErrorThrowingChannelExceptionHandler<T>
- java.lang.Object
-
- de.quantummaid.eventmaid.channel.exception.ErrorThrowingChannelExceptionHandler<T>
-
- Type Parameters:
T- the type of the message
- All Implemented Interfaces:
ChannelExceptionHandler<T>
public final class ErrorThrowingChannelExceptionHandler<T> extends Object implements ChannelExceptionHandler<T>
AChannelExceptionHandler, that will throw every exception on the currentThread.
-
-
Constructor Summary
Constructors Constructor Description ErrorThrowingChannelExceptionHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> ErrorThrowingChannelExceptionHandler<T>errorThrowingChannelExceptionHandler()Factory method to create a newErrorThrowingChannelExceptionHandler.voidhandleFilterException(ProcessingContext<T> message, Exception e)Method, that is called, when an exception is thrown inside aFilter.voidhandleSubscriberException(ProcessingContext<T> message, Exception e)When the delivery should be aborted, this method is called to handle the exception.booleanshouldSubscriberErrorBeHandledAndDeliveryAborted(ProcessingContext<T> message, Exception e)When an exception is thrown inside the final action, this message can decide, if the message should be ignored or if the delivery should be aborted andhandleSubscriberExceptionshould be called.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.quantummaid.eventmaid.channel.exception.ChannelExceptionHandler
handleBubbledUpException
-
-
-
-
Method Detail
-
errorThrowingChannelExceptionHandler
public static <T> ErrorThrowingChannelExceptionHandler<T> errorThrowingChannelExceptionHandler()
Factory method to create a newErrorThrowingChannelExceptionHandler.- Type Parameters:
T- the type of messages of theChannel- Returns:
- a new
ErrorThrowingChannelExceptionHandler
-
shouldSubscriberErrorBeHandledAndDeliveryAborted
public boolean shouldSubscriberErrorBeHandledAndDeliveryAborted(ProcessingContext<T> message, Exception e)
Description copied from interface:ChannelExceptionHandlerWhen an exception is thrown inside the final action, this message can decide, if the message should be ignored or if the delivery should be aborted andhandleSubscriberExceptionshould be called.- Specified by:
shouldSubscriberErrorBeHandledAndDeliveryAbortedin interfaceChannelExceptionHandler<T>- Parameters:
message- the message, that caused the exceptione- the thrown exception- Returns:
- if the delivery should be aborted and the exception be handled;
falseif the exception should be ignored
-
handleSubscriberException
public void handleSubscriberException(ProcessingContext<T> message, Exception e)
Description copied from interface:ChannelExceptionHandlerWhen the delivery should be aborted, this method is called to handle the exception.- Specified by:
handleSubscriberExceptionin interfaceChannelExceptionHandler<T>- Parameters:
message- the message, that caused the exceptione- the thrown exception
-
handleFilterException
public void handleFilterException(ProcessingContext<T> message, Exception e)
Description copied from interface:ChannelExceptionHandlerMethod, that is called, when an exception is thrown inside aFilter.- Specified by:
handleFilterExceptionin interfaceChannelExceptionHandler<T>- Parameters:
message- the message, that caused the exceptione- the thrown exception
-
-