KickJava   Java API By Example, From Geeks To Geeks.

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


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 org.apache.servicemix.jbi.framework.ComponentNameSpace;
20 import org.w3c.dom.DocumentFragment JavaDoc;
21
22 import javax.jbi.servicedesc.ServiceEndpoint;
23 import javax.xml.namespace.QName JavaDoc;
24
25 /**
26  * External endpoints are wrapper for endpoints registered
27  * by {@link javax.jbi.component.ComponentContext#registerExternalEndpoint(ServiceEndpoint)}.
28  * These endpoints can not be used to address message exchanges.
29  *
30  * TODO: this class should be serializable
31  */

32 public class ExternalEndpoint extends AbstractServiceEndpoint {
33
34     /**
35      * Generated serial version UID
36      */

37     private static final long serialVersionUID = 4257588916448457889L;
38     
39     protected final ServiceEndpoint se;
40     
41     public ExternalEndpoint(ComponentNameSpace cns, ServiceEndpoint se) {
42         super(cns);
43         this.se = se;
44     }
45     
46     /* (non-Javadoc)
47      * @see javax.jbi.servicedesc.ServiceEndpoint#getAsReference(javax.xml.namespace.QName)
48      */

49     public DocumentFragment JavaDoc getAsReference(QName JavaDoc operationName) {
50         return se.getAsReference(operationName);
51     }
52
53     /* (non-Javadoc)
54      * @see javax.jbi.servicedesc.ServiceEndpoint#getEndpointName()
55      */

56     public String JavaDoc getEndpointName() {
57         return se.getEndpointName();
58     }
59
60     /* (non-Javadoc)
61      * @see javax.jbi.servicedesc.ServiceEndpoint#getInterfaces()
62      */

63     public QName JavaDoc[] getInterfaces() {
64         return se.getInterfaces();
65     }
66
67     /* (non-Javadoc)
68      * @see javax.jbi.servicedesc.ServiceEndpoint#getServiceName()
69      */

70     public QName JavaDoc getServiceName() {
71         return se.getServiceName();
72     }
73
74     /* (non-Javadoc)
75      * @see java.lang.Object#equals(java.lang.Object)
76      */

77     public boolean equals(Object JavaDoc obj) {
78         return se.equals(obj);
79     }
80
81     /* (non-Javadoc)
82      * @see java.lang.Object#hashCode()
83      */

84     public int hashCode() {
85         return se.hashCode();
86     }
87
88 }
89
Popular Tags