Class AbstractChannelAdapterParser
java.lang.Object
org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
org.springframework.integration.config.xml.AbstractChannelAdapterParser
- All Implemented Interfaces:
BeanDefinitionParser
- Direct Known Subclasses:
AbstractOutboundChannelAdapterParser
,AbstractPollingInboundChannelAdapterParser
,AbstractXmppInboundChannelAdapterParser
,EventInboundChannelAdapterParser
,FileTailInboundChannelAdapterParser
,ImapIdleChannelAdapterParser
,KafkaMessageDrivenChannelAdapterParser
,MqttMessageDrivenChannelAdapterParser
,NotificationListeningChannelAdapterParser
,RedisInboundChannelAdapterParser
,RedisQueueInboundChannelAdapterParser
,StompInboundChannelAdapterParser
,TcpInboundChannelAdapterParser
,UdpInboundChannelAdapterParser
,WebSocketInboundChannelAdapterParser
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
.
- Author:
- Mark Fisher, Artem Bilan, Gary Russell
-
Field Summary
Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE, NAME_ATTRIBUTE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract AbstractBeanDefinition
doParse
(Element element, ParserContext parserContext, String channelName) Subclasses must implement this method to parse the adapter element.protected final AbstractBeanDefinition
parseInternal
(Element element, ParserContext parserContext) protected final String
resolveId
(Element element, AbstractBeanDefinition definition, ParserContext parserContext) Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
parse, postProcessComponentDefinition, registerBeanDefinition, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback, shouldParseNameAsAliases
-
Constructor Details
-
AbstractChannelAdapterParser
public AbstractChannelAdapterParser()
-
-
Method Details
-
resolveId
protected final String resolveId(Element element, AbstractBeanDefinition definition, ParserContext parserContext) throws BeanDefinitionStoreException - Overrides:
resolveId
in classAbstractBeanDefinitionParser
- Throws:
BeanDefinitionStoreException
-
parseInternal
- Specified by:
parseInternal
in classAbstractBeanDefinitionParser
-
doParse
protected abstract AbstractBeanDefinition doParse(Element element, 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.
-