KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Dynamic endpoints are used to route exchanges using endpoint references.
27  */

28 public class DynamicEndpoint extends AbstractServiceEndpoint {
29
30     /**
31      * Generated serial version UID
32      */

33     private static final long serialVersionUID = -9084647509619730734L;
34     
35     private final QName JavaDoc serviceName;
36     private final String JavaDoc endpointName;
37     private final transient DocumentFragment JavaDoc epr;
38     
39     public DynamicEndpoint(ComponentNameSpace componentName,
40                            ServiceEndpoint endpoint,
41                            DocumentFragment JavaDoc epr) {
42         super(componentName);
43         this.serviceName = endpoint.getServiceName();
44         this.endpointName = endpoint.getEndpointName();
45         this.epr = epr;
46     }
47     
48     /* (non-Javadoc)
49      * @see javax.jbi.servicedesc.ServiceEndpoint#getAsReference(javax.xml.namespace.QName)
50      */

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

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

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

72     public QName JavaDoc getServiceName() {
73         return serviceName;
74     }
75
76 }
77
Popular Tags