KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > servicemix > jbi > servicedesc > LinkedEndpoint


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

17 package org.apache.servicemix.jbi.servicedesc;
18
19 import javax.xml.namespace.QName JavaDoc;
20
21 import org.w3c.dom.DocumentFragment JavaDoc;
22
23 /**
24  * Linked endpoints are defined by SA deployment.
25  * They act as proxies for real endpoints.
26  */

27 public class LinkedEndpoint extends AbstractServiceEndpoint {
28
29     /**
30      * Generated serial version UID
31      */

32     private static final long serialVersionUID = 4615848436197469611L;
33     
34     private final QName JavaDoc fromService;
35     private final String JavaDoc fromEndpoint;
36     private final QName JavaDoc toService;
37     private final String JavaDoc toEndpoint;
38     private final String JavaDoc linkType;
39     
40     public LinkedEndpoint(QName JavaDoc fromService,
41                           String JavaDoc fromEndpoint,
42                           QName JavaDoc toService,
43                           String JavaDoc toEndpoint,
44                           String JavaDoc linkType) {
45         super(null);
46         this.fromService = fromService;
47         this.fromEndpoint = fromEndpoint;
48         this.toService = toService;
49         this.toEndpoint = toEndpoint;
50         this.linkType = linkType;
51     }
52     
53     /* (non-Javadoc)
54      * @see javax.jbi.servicedesc.ServiceEndpoint#getAsReference(javax.xml.namespace.QName)
55      */

56     public DocumentFragment JavaDoc getAsReference(QName JavaDoc operationName) {
57         return EndpointReferenceBuilder.getReference(this);
58     }
59
60     /* (non-Javadoc)
61      * @see javax.jbi.servicedesc.ServiceEndpoint#getEndpointName()
62      */

63     public String JavaDoc getEndpointName() {
64         return this.fromEndpoint;
65     }
66
67     /* (non-Javadoc)
68      * @see javax.jbi.servicedesc.ServiceEndpoint#getInterfaces()
69      */

70     public QName JavaDoc[] getInterfaces() {
71         return null;
72     }
73
74     /* (non-Javadoc)
75      * @see javax.jbi.servicedesc.ServiceEndpoint#getServiceName()
76      */

77     public QName JavaDoc getServiceName() {
78         return this.fromService;
79     }
80
81     /**
82      * Get the link type.
83      * @return the link type
84      */

85     public String JavaDoc getLinkType() {
86         return linkType;
87     }
88
89     /**
90      * Get the destination endpoint.
91      * @return the destination endpoint
92      */

93     public String JavaDoc getToEndpoint() {
94         return toEndpoint;
95     }
96
97     /**
98      * Get the destination service.
99      * @return the destination service
100      */

101     public QName JavaDoc getToService() {
102         return toService;
103     }
104
105 }
106
Popular Tags