Class 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>
    A ChannelExceptionHandler, that will throw every exception on the current Thread.
    • Constructor Detail

      • ErrorThrowingChannelExceptionHandler

        public ErrorThrowingChannelExceptionHandler()
    • Method Detail

      • errorThrowingChannelExceptionHandler

        public static <T> ErrorThrowingChannelExceptionHandler<T> errorThrowingChannelExceptionHandler()
        Factory method to create a new ErrorThrowingChannelExceptionHandler.
        Type Parameters:
        T - the type of messages of the Channel
        Returns:
        a new ErrorThrowingChannelExceptionHandler
      • shouldSubscriberErrorBeHandledAndDeliveryAborted

        public boolean shouldSubscriberErrorBeHandledAndDeliveryAborted​(ProcessingContext<T> message,
                                                                        Exception e)
        Description copied from interface: ChannelExceptionHandler
        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 and handleSubscriberException should be called.
        Specified by:
        shouldSubscriberErrorBeHandledAndDeliveryAborted in interface ChannelExceptionHandler<T>
        Parameters:
        message - the message, that caused the exception
        e - the thrown exception
        Returns:
        if the delivery should be aborted and the exception be handled; false if the exception should be ignored