Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
RouterDefinitionParser |
|
| 1.0;1 |
1 | /* | |
2 | * $Id: RouterDefinitionParser.java 11531 2008-04-08 15:34:34Z rossmason $ | |
3 | * -------------------------------------------------------------------------------------- | |
4 | * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.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.config.spring.parsers.generic.ChildDefinitionParser; | |
13 | import org.mule.routing.inbound.AbstractEventAggregator; | |
14 | ||
15 | /** | |
16 | * Generic router definition parser for parsing all Router elements. | |
17 | */ | |
18 | public class RouterDefinitionParser extends ChildDefinitionParser | |
19 | { | |
20 | ||
21 | public static final String ROUTER = "router"; | |
22 | ||
23 | public RouterDefinitionParser(Class clazz) | |
24 | { | |
25 | 0 | super(ROUTER, clazz); |
26 | 0 | standardOptions(); |
27 | 0 | } |
28 | ||
29 | // specifically for subclasses of CorrelationAggregator (requires a "class=..." in the config) | |
30 | public RouterDefinitionParser() | |
31 | { | |
32 | 0 | super(ROUTER, null, AbstractEventAggregator.class, true); |
33 | 0 | standardOptions(); |
34 | 0 | } |
35 | ||
36 | protected void standardOptions() | |
37 | { | |
38 | 0 | addMapping("enableCorrelation", "IF_NOT_SET=0,ALWAYS=1,NEVER=2"); |
39 | 0 | } |
40 | ||
41 | } |