Class AbstractReplyProducingMessageHandler

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.core.Ordered, ExpressionCapable, Orderable, MessageProducer, HeaderPropagationAware, IntegrationPattern, NamedComponent, IntegrationManagement, TrackableComponent, org.springframework.messaging.MessageHandler, reactor.core.CoreSubscriber<org.springframework.messaging.Message<?>>
Direct Known Subclasses:
AbstractMessageSplitter, AbstractReplyProducingPostProcessingMessageHandler, BarrierMessageHandler, BridgeHandler, ContentEnricher, DelayHandler, GatewayMessageHandler, MessageTransformingHandler, ReplyProducingMessageHandlerWrapper, ScatterGatherHandler, ServiceActivatingHandler

public abstract class AbstractReplyProducingMessageHandler extends AbstractMessageProducingHandler implements org.springframework.beans.factory.BeanClassLoaderAware
Base class for MessageHandlers that are capable of producing replies.
  • Constructor Details

    • AbstractReplyProducingMessageHandler

      public AbstractReplyProducingMessageHandler()
  • Method Details

    • setRequiresReply

      public void setRequiresReply(boolean requiresReply)
      Flag whether a reply is required. If true an incoming message MUST result in a reply message being sent. If false an incoming message MAY result in a reply message being sent. Default is false.
      Parameters:
      requiresReply - true if a reply is required.
    • getRequiresReply

      protected boolean getRequiresReply()
    • setAdviceChain

      public void setAdviceChain(List<org.aopalliance.aop.Advice> adviceChain)
      Configure a list of Advices to proxy a handleRequestMessage(Message) method.
      Parameters:
      adviceChain - the list of Advices to use.
    • hasAdviceChain

      protected boolean hasAdviceChain()
    • setBeanClassLoader

      public void setBeanClassLoader(ClassLoader beanClassLoader)
      Specified by:
      setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAware
    • getBeanClassLoader

      protected ClassLoader getBeanClassLoader()
    • getIntegrationPatternType

      public IntegrationPatternType getIntegrationPatternType()
      Description copied from interface: IntegrationPattern
      Return a pattern type this component implements.
      Specified by:
      getIntegrationPatternType in interface IntegrationPattern
      Overrides:
      getIntegrationPatternType in class MessageHandlerSupport
      Returns:
      the IntegrationPatternType this component implements.
    • onInit

      protected final void onInit()
      Description copied from class: IntegrationObjectSupport
      Subclasses may implement this for initialization logic.
      Overrides:
      onInit in class AbstractMessageProducingHandler
    • doInit

      protected void doInit()
    • handleMessageInternal

      protected final void handleMessageInternal(org.springframework.messaging.Message<?> message)
      Specified by:
      handleMessageInternal in class AbstractMessageHandler
    • doInvokeAdvisedRequestHandler

      @Nullable protected Object doInvokeAdvisedRequestHandler(org.springframework.messaging.Message<?> message)
    • handleRequestMessage

      @Nullable protected abstract Object handleRequestMessage(org.springframework.messaging.Message<?> requestMessage)
      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.
      Parameters:
      requestMessage - The request message.
      Returns:
      The result of handling the message, or null.