Class AbstractChannelAdapterParser

java.lang.Object
org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
org.springframework.integration.config.xml.AbstractChannelAdapterParser
All Implemented Interfaces:
org.springframework.beans.factory.xml.BeanDefinitionParser
Direct Known Subclasses:
AbstractOutboundChannelAdapterParser, AbstractPollingInboundChannelAdapterParser

public abstract class AbstractChannelAdapterParser extends org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
Base parser for Channel Adapters.

Includes logic to determine MessageChannel: if 'channel' attribute is defined - uses its value as 'channelName'; if 'id' attribute is defined - creates DirectChannel at runtime and uses id's value as 'channelName'; if current component is defined as nested element inside any other components e.g. <chain> 'id' and 'channel' attributes will be ignored and this component will not be parsed as AbstractEndpoint.

  • Field Summary

    Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser

    ID_ATTRIBUTE, NAME_ATTRIBUTE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract org.springframework.beans.factory.support.AbstractBeanDefinition
    doParse(Element element, org.springframework.beans.factory.xml.ParserContext parserContext, String channelName)
    Subclasses must implement this method to parse the adapter element.
    protected final org.springframework.beans.factory.support.AbstractBeanDefinition
    parseInternal(Element element, org.springframework.beans.factory.xml.ParserContext parserContext)
     
    protected final String
    resolveId(Element element, org.springframework.beans.factory.support.AbstractBeanDefinition definition, org.springframework.beans.factory.xml.ParserContext parserContext)
     

    Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser

    parse, postProcessComponentDefinition, registerBeanDefinition, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback, shouldParseNameAsAliases

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractChannelAdapterParser

      public AbstractChannelAdapterParser()
  • Method Details

    • resolveId

      protected final String resolveId(Element element, org.springframework.beans.factory.support.AbstractBeanDefinition definition, org.springframework.beans.factory.xml.ParserContext parserContext) throws org.springframework.beans.factory.BeanDefinitionStoreException
      Overrides:
      resolveId in class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
      Throws:
      org.springframework.beans.factory.BeanDefinitionStoreException
    • parseInternal

      protected final org.springframework.beans.factory.support.AbstractBeanDefinition parseInternal(Element element, org.springframework.beans.factory.xml.ParserContext parserContext)
      Specified by:
      parseInternal in class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
    • doParse

      protected abstract org.springframework.beans.factory.support.AbstractBeanDefinition doParse(Element element, org.springframework.beans.factory.xml.ParserContext parserContext, String channelName)
      Subclasses must implement this method to parse the adapter element. The name of the MessageChannel bean is provided.
      Parameters:
      element - The element.
      parserContext - The parser context.
      channelName - The channel name.
      Returns:
      The bean definition.