Class AbstractStandardMessageHandlerFactoryBean

java.lang.Object
org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean<MessageHandler>
org.springframework.integration.config.AbstractStandardMessageHandlerFactoryBean
All Implemented Interfaces:
Aware, BeanFactoryAware, BeanNameAware, DisposableBean, FactoryBean<MessageHandler>, ApplicationContextAware, ApplicationEventPublisherAware
Direct Known Subclasses:
FilterFactoryBean, RouterFactoryBean, ServiceActivatorFactoryBean, SplitterFactoryBean, TransformerFactoryBean

public abstract class AbstractStandardMessageHandlerFactoryBean extends AbstractSimpleMessageHandlerFactoryBean<MessageHandler> implements DisposableBean
Base class for FactoryBeans that create standard MessageHandler instances.
Author:
Mark Fisher, Alexander Peters, Gary Russell, Artem Bilan, David Liu, Ngoc Nhan
  • Constructor Details

    • AbstractStandardMessageHandlerFactoryBean

      public AbstractStandardMessageHandlerFactoryBean()
  • Method Details

    • setTargetObject

      public void setTargetObject(Object targetObject)
      Set the target POJO for the message handler.
      Parameters:
      targetObject - the target object.
    • setTargetMethodName

      public void setTargetMethodName(String targetMethodName)
      Set the method name for the message handler.
      Parameters:
      targetMethodName - the target method name.
    • setExpressionString

      public void setExpressionString(String expressionString)
      Set a SpEL expression to use.
      Parameters:
      expressionString - the expression as a String.
    • setExpression

      public void setExpression(Expression expression)
      Set a SpEL expression to use.
      Parameters:
      expression - the expression.
    • setRequiresReply

      public void setRequiresReply(Boolean requiresReply)
    • setSendTimeout

      public void setSendTimeout(Long sendTimeout)
    • getSendTimeout

      public Long getSendTimeout()
    • destroy

      public void destroy()
      Specified by:
      destroy in interface DisposableBean
    • createHandler

      protected MessageHandler createHandler()
      Specified by:
      createHandler in class AbstractSimpleMessageHandlerFactoryBean<MessageHandler>
    • checkForIllegalTarget

      protected void checkForIllegalTarget(Object targetObject, String targetMethodName)
    • createMethodInvokingHandler

      protected abstract MessageHandler createMethodInvokingHandler(Object targetObject, String targetMethodName)
      Subclasses must implement this method to create the MessageHandler.
      Parameters:
      targetObject - the object to use for method invocation.
      targetMethodName - the method name of the target object to invoke.
      Returns:
      the method invoking MessageHandler implementation.
    • createExpressionEvaluatingHandler

      protected MessageHandler createExpressionEvaluatingHandler(Expression expression)
    • createMessageProcessingHandler

      protected <T> MessageHandler createMessageProcessingHandler(MessageProcessor<T> processor)
    • createDefaultHandler

      protected MessageHandler createDefaultHandler()
    • methodIsHandleMessageOrEmpty

      protected boolean methodIsHandleMessageOrEmpty(String targetMethodName)
    • canBeUsedDirect

      protected boolean canBeUsedDirect(AbstractMessageProducingHandler handler)
    • postProcessReplyProducer

      protected void postProcessReplyProducer(AbstractMessageProducingHandler handler)