Class GatewayMessageHandler

All Implemented Interfaces:
org.reactivestreams.Subscriber<Message<?>>, Aware, BeanClassLoaderAware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, Lifecycle, Ordered, ExpressionCapable, Orderable, MessageProducer, HeaderPropagationAware, IntegrationPattern, NamedComponent, IntegrationManagement, ManageableLifecycle, TrackableComponent, MessageHandler, reactor.core.CoreSubscriber<Message<?>>

public class GatewayMessageHandler extends AbstractReplyProducingMessageHandler implements ManageableLifecycle
The AbstractReplyProducingMessageHandler implementation for mid-flow Gateway.
Since:
5.0
Author:
Artem Bilan, Christian Tzolov
  • Constructor Details

    • GatewayMessageHandler

      public GatewayMessageHandler()
  • Method Details

    • setRequestChannel

      public void setRequestChannel(MessageChannel requestChannel)
    • setRequestChannelName

      public void setRequestChannelName(String requestChannel)
    • setReplyChannel

      public void setReplyChannel(MessageChannel replyChannel)
    • setReplyChannelName

      public void setReplyChannelName(String replyChannel)
    • setErrorChannel

      public void setErrorChannel(MessageChannel errorChannel)
    • setErrorChannelName

      public void setErrorChannelName(String errorChannel)
    • setRequestTimeout

      public void setRequestTimeout(Long requestTimeout)
    • setReplyTimeout

      public void setReplyTimeout(Long replyTimeout)
    • setErrorOnTimeout

      public void setErrorOnTimeout(boolean errorOnTimeout)
    • handleRequestMessage

      protected Object handleRequestMessage(Message<?> requestMessage)
      Description copied from class: AbstractReplyProducingMessageHandler
      Subclasses must implement this method to handle the request Message. The return value may be a Message, a MessageBuilder, or any plain Object. The base class will handle the final creation of a reply Message from any of those starting points. If the return value is null, the Message flow will end here.
      Specified by:
      handleRequestMessage in class AbstractReplyProducingMessageHandler
      Parameters:
      requestMessage - The request message.
      Returns:
      The result of handling the message, or null.
    • start

      public void start()
      Specified by:
      start in interface Lifecycle
      Specified by:
      start in interface ManageableLifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface Lifecycle
      Specified by:
      stop in interface ManageableLifecycle
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface Lifecycle
      Specified by:
      isRunning in interface ManageableLifecycle