KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > deployment > wsdd > WSDDTransport


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.axis.deployment.wsdd;
17
18 import org.apache.axis.encoding.SerializationContext;
19 import org.w3c.dom.Element JavaDoc;
20 import org.xml.sax.helpers.AttributesImpl JavaDoc;
21
22 import javax.xml.namespace.QName JavaDoc;
23 import java.io.IOException JavaDoc;
24
25
26 /**
27  *
28  */

29 public class WSDDTransport
30     extends WSDDTargetedChain
31 {
32     /**
33      * Default constructor
34      */

35     public WSDDTransport()
36     {
37     }
38     
39     /**
40      *
41      * @param e (Element) XXX
42      * @throws WSDDException XXX
43      */

44     public WSDDTransport(Element JavaDoc e)
45         throws WSDDException
46     {
47         super(e);
48     }
49
50     protected QName JavaDoc getElementName() {
51         return WSDDConstants.QNAME_TRANSPORT;
52     }
53
54     /**
55      * Write this element out to a SerializationContext
56      */

57     public void writeToContext(SerializationContext context)
58             throws IOException JavaDoc {
59         AttributesImpl JavaDoc attrs = new AttributesImpl JavaDoc();
60         QName JavaDoc name = getQName();
61         if (name != null) {
62             attrs.addAttribute("", ATTR_NAME, ATTR_NAME,
63                                "CDATA", context.qName2String(name));
64         }
65         
66         name = getPivotQName();
67         if (name != null) {
68             attrs.addAttribute("", ATTR_PIVOT, ATTR_PIVOT,
69                                "CDATA", context.qName2String(name));
70         }
71         
72         context.startElement(WSDDConstants.QNAME_TRANSPORT, attrs);
73         writeFlowsToContext(context);
74         writeParamsToContext(context);
75         context.endElement();
76     }
77
78     public void deployToRegistry(WSDDDeployment registry)
79     {
80         registry.addTransport(this);
81         
82         super.deployToRegistry(registry);
83     }
84 }
85
Popular Tags