1 | package org.springframework.batch.core.configuration.xml; |
2 | |
3 | import org.springframework.batch.core.listener.AbstractListenerFactoryBean; |
4 | import org.springframework.beans.factory.support.BeanDefinitionBuilder; |
5 | import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser; |
6 | import org.springframework.beans.factory.xml.ParserContext; |
7 | import org.w3c.dom.Element; |
8 | |
9 | /** |
10 | * Parse <step-listener/> elements in the batch namespace. |
11 | * |
12 | * @author Dan Garrette |
13 | * @since 2.0 |
14 | */ |
15 | public class TopLevelStepListenerParser extends AbstractSingleBeanDefinitionParser { |
16 | |
17 | private static final StepListenerParser stepListenerParser = new StepListenerParser(); |
18 | |
19 | @Override |
20 | protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) { |
21 | stepListenerParser.doParse(element, parserContext, builder); |
22 | } |
23 | |
24 | @Override |
25 | protected Class<? extends AbstractListenerFactoryBean> getBeanClass(Element element) { |
26 | return stepListenerParser.getBeanClass(); |
27 | } |
28 | |
29 | } |