01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19:
20: package org.apache.synapse.config.xml;
21:
22: import org.apache.axiom.om.OMElement;
23: import org.apache.synapse.Mediator;
24: import org.apache.synapse.mediators.filters.InMediator;
25:
26: import javax.xml.namespace.QName;
27:
28: /**
29: * Creates an In mediator instance
30: *
31: * <pre>
32: * <in>
33: * mediator+
34: * </in>
35: * </pre>
36: */
37: public class InMediatorFactory extends AbstractListMediatorFactory {
38:
39: private static final QName IN_Q = new QName(
40: XMLConfigConstants.SYNAPSE_NAMESPACE, "in");
41:
42: public Mediator createMediator(OMElement elem) {
43: InMediator filter = new InMediator();
44: // after successfully creating the mediator
45: // set its common attributes such as tracing etc
46: processTraceState(filter, elem);
47: addChildren(elem, filter);
48: return filter;
49: }
50:
51: public QName getTagQName() {
52: return IN_Q;
53: }
54: }
|