View Javadoc

1   /*
2    * $Id: DefaultThreadingProfileDefinitionParser.java 21659 2011-04-05 09:47:38Z dirk.olmes $
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  package org.mule.config.spring.parsers.specific;
11  
12  import org.mule.api.config.ThreadingProfile;
13  import org.mule.config.ChainedThreadingProfile;
14  import org.mule.config.spring.parsers.generic.OrphanDefinitionParser;
15  import org.mule.config.spring.parsers.processors.IdAttribute;
16  import org.mule.config.spring.parsers.processors.NameAttribute;
17  
18  /**
19   * This parser is responsible for processing the <code><threading-profile><code> configuration elements.
20   */
21  public class DefaultThreadingProfileDefinitionParser extends OrphanDefinitionParser
22  {
23  
24      public DefaultThreadingProfileDefinitionParser(String propertyName)
25      {
26          super(ChainedThreadingProfile.class, true);
27          addMapping("poolExhaustedAction", ThreadingProfile.POOL_EXHAUSTED_ACTIONS);
28          registerPostProcessor(new IdAttribute(propertyName));
29          registerPostProcessor(new NameAttribute(propertyName));
30      }
31  
32  }