01: /*
02: * $Id: DefaultThreadingProfileDefinitionParser.java 10489 2008-01-23 17:53:38Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
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: // shouldn't this extend MuleOrphanDefinitionParser?
22: public class DefaultThreadingProfileDefinitionParser extends
23: OrphanDefinitionParser {
24:
25: public DefaultThreadingProfileDefinitionParser(String propertyName) {
26: super (ChainedThreadingProfile.class, true);
27: addMapping("poolExhaustedAction",
28: ThreadingProfile.POOL_EXHAUSTED_ACTIONS);
29: registerPostProcessor(new IdAttribute(propertyName));
30: registerPostProcessor(new NameAttribute(propertyName));
31: }
32:
33: }
|