Class GatewayMessageHandler

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

public class GatewayMessageHandler extends AbstractReplyProducingMessageHandler implements ManageableLifecycle
The AbstractReplyProducingMessageHandler implementation for mid-flow Gateway.
Since:
5.0
  • Constructor Details

    • GatewayMessageHandler

      public GatewayMessageHandler()
  • Method Details

    • setRequestChannel

      public void setRequestChannel(org.springframework.messaging.MessageChannel requestChannel)
    • setRequestChannelName

      public void setRequestChannelName(String requestChannel)
    • setReplyChannel

      public void setReplyChannel(org.springframework.messaging.MessageChannel replyChannel)
    • setReplyChannelName

      public void setReplyChannelName(String replyChannel)
    • setErrorChannel

      public void setErrorChannel(org.springframework.messaging.MessageChannel errorChannel)
    • setErrorChannelName

      public void setErrorChannelName(String errorChannel)
    • setRequestTimeout

      public void setRequestTimeout(Long requestTimeout)
    • setReplyTimeout

      public void setReplyTimeout(Long replyTimeout)
    • handleRequestMessage

      protected Object handleRequestMessage(org.springframework.messaging.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 org.springframework.context.Lifecycle
      Specified by:
      start in interface ManageableLifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
      Specified by:
      stop in interface ManageableLifecycle
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
      Specified by:
      isRunning in interface ManageableLifecycle