Class MessagePublishingErrorHandler

java.lang.Object
org.springframework.integration.core.ErrorMessagePublisher
org.springframework.integration.channel.MessagePublishingErrorHandler
All Implemented Interfaces:
Aware, BeanFactoryAware, ErrorHandler

public class MessagePublishingErrorHandler extends ErrorMessagePublisher implements ErrorHandler
ErrorHandler implementation that sends an ErrorMessage to a MessageChannel.
Author:
Mark Fisher, Iwein Fuld, Oleg Zhurakousky, Gary Russell, Artem Bilan
  • Constructor Details

    • MessagePublishingErrorHandler

      public MessagePublishingErrorHandler()
    • MessagePublishingErrorHandler

      public MessagePublishingErrorHandler(DestinationResolver<MessageChannel> channelResolver)
  • Method Details

    • setDefaultErrorChannel

      public void setDefaultErrorChannel(@Nullable MessageChannel defaultErrorChannel)
    • getDefaultErrorChannel

      @Nullable public MessageChannel getDefaultErrorChannel()
      Return the default error channel for this error handler.
      Returns:
      the error channel.
      Since:
      4.3
    • setDefaultErrorChannelName

      public void setDefaultErrorChannelName(String defaultErrorChannelName)
      Specify the bean name of default error channel for this error handler.
      Parameters:
      defaultErrorChannelName - the bean name of the error channel
      Since:
      4.3.3
    • handleError

      public final void handleError(Throwable ex)
      Specified by:
      handleError in interface ErrorHandler