Class AbstractSimpleMessageHandlerFactoryBean<H extends MessageHandler>

java.lang.Object
org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean<H>
Type Parameters:
H - the target message handler type.
All Implemented Interfaces:
Aware, BeanFactoryAware, BeanNameAware, FactoryBean<MessageHandler>, ApplicationContextAware, ApplicationEventPublisherAware
Direct Known Subclasses:
AbstractStandardMessageHandlerFactoryBean, AggregatorFactoryBean, ControlBusFactoryBean, ExpressionControlBusFactoryBean, FileWritingMessageHandlerFactoryBean, GroovyControlBusFactoryBean, JpaOutboundGatewayFactoryBean

public abstract class AbstractSimpleMessageHandlerFactoryBean<H extends MessageHandler> extends Object implements FactoryBean<MessageHandler>, ApplicationContextAware, BeanFactoryAware, BeanNameAware, ApplicationEventPublisherAware
Factory bean to create and configure a MessageHandler.
Author:
Dave Syer, Oleg Zhurakousky, Gary Russell, Artem Bilan, David Liu, Christian Tzolov, Ngoc Nhan
  • Field Details Link icon

    • logger Link icon

      protected final Log logger
  • Constructor Details Link icon

    • AbstractSimpleMessageHandlerFactoryBean Link icon

      public AbstractSimpleMessageHandlerFactoryBean()
  • Method Details Link icon

    • setApplicationContext Link icon

      public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
      Specified by:
      setApplicationContext in interface ApplicationContextAware
      Throws:
      BeansException
    • setBeanName Link icon

      public void setBeanName(String beanName)
      Specified by:
      setBeanName in interface BeanNameAware
    • setApplicationEventPublisher Link icon

      public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
      Specified by:
      setApplicationEventPublisher in interface ApplicationEventPublisherAware
    • setChannelResolver Link icon

      public void setChannelResolver(DestinationResolver<MessageChannel> channelResolver)
      Set the handler's channel resolver.
      Parameters:
      channelResolver - the channel resolver to set.
    • setOutputChannel Link icon

      public void setOutputChannel(MessageChannel outputChannel)
      Set the handler's output channel.
      Parameters:
      outputChannel - the output channel to set.
    • setOutputChannelName Link icon

      public void setOutputChannelName(String outputChannelName)
      Set the handler's output channel name.
      Parameters:
      outputChannelName - the output channel bean name to set.
      Since:
      5.1.4
    • setOrder Link icon

      public void setOrder(Integer order)
      Set the order in which the handler will be subscribed to its channel (when subscribable).
      Parameters:
      order - the order to set.
    • setBeanFactory Link icon

      public void setBeanFactory(BeanFactory beanFactory) throws BeansException
      Specified by:
      setBeanFactory in interface BeanFactoryAware
      Throws:
      BeansException
    • getBeanFactory Link icon

      protected BeanFactory getBeanFactory()
    • setAdviceChain Link icon

      public void setAdviceChain(List<Advice> adviceChain)
      Set the advice chain to be configured within an AbstractReplyProducingMessageHandler to advise just this local endpoint. For other handlers, the advice chain is applied around the handler itself.
      Parameters:
      adviceChain - the adviceChain to set.
    • setAsync Link icon

      public void setAsync(Boolean async)
      Currently only exposed on the service activator namespace. It's not clear that other endpoints would benefit from async support, but any subclass of AbstractReplyProducingMessageHandler can potentially return a ListenableFuture<?>.
      Parameters:
      async - the async to set.
      Since:
      4.3
    • setComponentName Link icon

      public void setComponentName(String componentName)
      Sets the name of the handler component.
      Parameters:
      componentName - The component name.
    • getObject Link icon

      public H getObject()
      Specified by:
      getObject in interface FactoryBean<H extends MessageHandler>
    • createHandlerInternal Link icon

      protected final H createHandlerInternal()
    • createHandler Link icon

      protected abstract H createHandler()
    • getObjectType Link icon

      public Class<? extends MessageHandler> getObjectType()
      Specified by:
      getObjectType in interface FactoryBean<H extends MessageHandler>
    • getPreCreationHandlerType Link icon

      protected Class<? extends MessageHandler> getPreCreationHandlerType()
      Subclasses can override this to return a more specific type before handler creation. After handler creation, the actual type is used.
      Returns:
      the type.
    • isSingleton Link icon

      public boolean isSingleton()
      Specified by:
      isSingleton in interface FactoryBean<H extends MessageHandler>