KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > jbi > registry > LinkedEndpoint


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2005 Fossil E-Commerce, http://www.fossilec.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id: LinkedEndpoint.java 438 2006-05-19 11:12:26Z ddesjardins $
20  * -------------------------------------------------------------------------
21  */

22 package org.objectweb.petals.jbi.registry;
23
24 import java.io.Serializable JavaDoc;
25
26 import javax.xml.namespace.QName JavaDoc;
27
28 import org.objectweb.petals.jbi.management.service.EndpointService;
29
30 /**
31  * This endpoint represents a "connexion". A connexion is defined in a service
32  * assembly, and is like an alias for a real endpoint.
33  *
34  * @version $Rev: 438 $ $Date: 2006-05-19 13:12:26 +0200 (ven., 19 mai 2006) $
35  * @since Petals 1.0
36  * @author alouis
37  */

38 public class LinkedEndpoint extends AbstractEndpoint implements Serializable JavaDoc {
39
40     private static final String JavaDoc LINK = "linked-endpoint";
41
42     /**
43      *
44      */

45     private static final long serialVersionUID = 1L;
46
47     /**
48      * List of interfaces (null or only one interface)
49      */

50     protected QName JavaDoc[] interfaces;
51
52     /**
53      * Real endpoint name
54      */

55     protected String JavaDoc toEndpointName;
56
57     /**
58      * Real service name
59      */

60     protected QName JavaDoc toServiceName;
61
62     /**
63      *
64      * @param interfaceName
65      * @param toServiceName
66      * real servicename
67      * @param toEndpointName
68      * real endpoint name
69      */

70     public LinkedEndpoint(QName JavaDoc interfaceName, QName JavaDoc toServiceName,
71         String JavaDoc toEndpointName, EndpointService endpointService) {
72         super(null, null, LINK, LINK, EndpointType.LINKED, endpointService);
73         this.interfaces = new QName JavaDoc[] {interfaceName};
74         this.toServiceName = toServiceName;
75         this.toEndpointName = toEndpointName;
76     }
77
78     /**
79      *
80      * @param serviceName
81      * @param endpointName
82      * @param toServiceName
83      * real servicename
84      * @param toEndpointName
85      * real endpoint name
86      */

87     public LinkedEndpoint(QName JavaDoc serviceName, String JavaDoc endpointName,
88         QName JavaDoc toServiceName, String JavaDoc toEndpointName,
89         EndpointService endpointService) {
90         super(serviceName, endpointName, LINK, LINK, EndpointType.LINKED,
91             endpointService);
92         this.toServiceName = toServiceName;
93         this.toEndpointName = toEndpointName;
94     }
95
96     public QName JavaDoc[] getInterfaces() {
97         return interfaces;
98     }
99
100     public String JavaDoc getToEndpointName() {
101         return toEndpointName;
102     }
103
104     public QName JavaDoc getToServiceName() {
105         return toServiceName;
106     }
107
108     public void setToEndpointName(String JavaDoc toEndpointName) {
109         this.toEndpointName = toEndpointName;
110     }
111
112     public void setToServiceName(QName JavaDoc toServiceName) {
113         this.toServiceName = toServiceName;
114     }
115
116 }
117
Popular Tags