View Javadoc

1   /*
2    * $Id: AsyncMessageProcessorsDefinitionParser.java 22557 2011-07-25 22:48:27Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.config.spring.parsers.specific;
12  
13  import org.mule.config.spring.factories.AsyncMessageProcessorsFactoryBean;
14  import org.mule.config.spring.parsers.generic.ChildDefinitionParser;
15  import org.mule.config.spring.util.ProcessingStrategyUtils;
16  
17  import org.springframework.beans.factory.support.BeanDefinitionBuilder;
18  import org.springframework.beans.factory.xml.ParserContext;
19  import org.w3c.dom.Element;
20  
21  public class AsyncMessageProcessorsDefinitionParser extends ChildDefinitionParser
22  {
23      public AsyncMessageProcessorsDefinitionParser()
24      {
25          super("messageProcessor", AsyncMessageProcessorsFactoryBean.class);
26          addIgnored("processingStrategy");
27      }
28  
29      @Override
30      protected void parseChild(Element element, ParserContext parserContext, BeanDefinitionBuilder builder)
31      {
32          ProcessingStrategyUtils.configureProcessingStrategy(element, builder,
33              ProcessingStrategyUtils.QUEUED_ASYNC_PROCESSING_STRATEGY);
34          super.parseChild(element, parserContext, builder);
35      }
36  
37  }