Class MessageHandlerErrorStrategyAdapter

    • Field Detail

      • log

        @Nonnull
        private org.slf4j.Logger log
        Logger.
      • wrappedHandler

        @Nonnull
        private MessageHandler wrappedHandler
        The wrapped message handler.
      • rethrowIfHandled

        private boolean rethrowIfHandled
        Flag indicating whether the wrapped handler's exception should be rethrown after being handled successfully.
      • rethrowIfNotHandled

        private boolean rethrowIfNotHandled
        Flag indicating whether the wrapped handler's exception should be rethrown if not handled successfully by any configured error handler.
    • Constructor Detail

      • MessageHandlerErrorStrategyAdapter

        public MessageHandlerErrorStrategyAdapter​(@Nonnull
                                                  MessageHandler messageHandler,
                                                  @Nonnull @NonnullElements
                                                  List<TypedMessageErrorHandler> typedErrorHandlers)
        Constructor.
        Parameters:
        messageHandler - the wrapped message handler
        typedErrorHandlers - the list of typed error handlers to apply
    • Method Detail

      • setRethrowIfHandled

        public void setRethrowIfHandled​(boolean flag)
        Set whether to rethrow the error if it is successfully handled by one of the configured TypedMessageErrorHandler.

        Default is: false

        Parameters:
        flag - true if should rethrow, false if not
      • setRethrowIfNotHandled

        public void setRethrowIfNotHandled​(boolean flag)
        Set whether to rethrow the error if it is NOT successfully handled by any of the configured TypedMessageErrorHandler.

        Default is: true

        Parameters:
        flag - true if should rethrow, false if not