KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > ws > mbean > PortComponent


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 2005 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id$
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.jonas.ws.mbean;
26
27 import java.util.ArrayList JavaDoc;
28 import java.util.List JavaDoc;
29
30 /**
31  * A <code>PortComponent</code> represents a port-component
32  * in webservices.xml.
33  *
34  * @author Guillaume Sauthier
35  */

36 public class PortComponent extends AbstractWebServiceMBean {
37
38     /**
39      * PortComponent name
40      */

41     private String JavaDoc name = null;
42
43     /**
44      * wsdl:port QName
45      */

46     private String JavaDoc wsdlPort = null;
47
48     /**
49      * ssei fully qualified classname
50      */

51     private String JavaDoc serviceEndpointInterface = null;
52
53     /**
54      * Implementation Bean's ObjectName
55      */

56     private String JavaDoc implementationBeanOName = null;
57
58     /**
59      * Handler list (childs)
60      */

61     private List JavaDoc handlers = new ArrayList JavaDoc();
62
63     /**
64      * Handler's ObjectName list
65      */

66     private List JavaDoc handlerONames = new ArrayList JavaDoc();
67
68     /**
69      * Endpoint URL : where the PortComponent can be accessed
70      */

71     private String JavaDoc endpoint = null;
72
73     /**
74      * PortComponent Constructor
75      * @param objectName PortComponent's ObjectName
76      */

77     public PortComponent(String JavaDoc objectName) {
78         super(objectName);
79     }
80
81     /**
82      * @return Returns the endpoint.
83      */

84     public String JavaDoc getEndpoint() {
85         return endpoint;
86     }
87
88     /**
89      * @param endpoint The endpoint to set.
90      */

91     public void setEndpoint(String JavaDoc endpoint) {
92         this.endpoint = endpoint;
93     }
94
95     /**
96      * @return Returns the name.
97      */

98     public String JavaDoc getName() {
99         return name;
100     }
101
102     /**
103      * @param name The name to set.
104      */

105     public void setName(String JavaDoc name) {
106         this.name = name;
107     }
108
109     /**
110      * @return Returns the serviceEndpointInterface.
111      */

112     public String JavaDoc getServiceEndpointInterface() {
113         return serviceEndpointInterface;
114     }
115
116     /**
117      * @param serviceEndpointInterface The serviceEndpointInterface to set.
118      */

119     public void setServiceEndpointInterface(String JavaDoc serviceEndpointInterface) {
120         this.serviceEndpointInterface = serviceEndpointInterface;
121     }
122
123     /**
124      * @return Returns the wsdlPort.
125      */

126     public String JavaDoc getWsdlPort() {
127         return wsdlPort;
128     }
129
130     /**
131      * @param wsdlPort The wsdlPort to set.
132      */

133     public void setWsdlPort(String JavaDoc wsdlPort) {
134         this.wsdlPort = wsdlPort;
135     }
136
137     /**
138      * @return Returns the handlers.
139      */

140     public List JavaDoc getHandlersMBean() {
141         return handlers;
142     }
143
144     /**
145      * @return Returns the handlers.
146      */

147     public String JavaDoc[] getHandlers() {
148         return (String JavaDoc[]) handlerONames.toArray(new String JavaDoc[handlerONames.size()]);
149     }
150
151     /**
152      * Add a handler
153      * @param h Handler MBean
154      */

155     public void addHandlerMBean(Handler h) {
156         handlers.add(h);
157         handlerONames.add(h.getObjectName());
158     }
159
160     /**
161      * @return Returns the implementationBeanOName.
162      */

163     public String JavaDoc getImplementationBean() {
164         return implementationBeanOName;
165     }
166
167     /**
168      * @param implementationBean The implementationBeanOName to set.
169      */

170     public void setImplementationBean(String JavaDoc implementationBean) {
171         this.implementationBeanOName = implementationBean;
172     }
173
174     /**
175      * @return Returns the PortComponent MBean subtype
176      */

177     protected String JavaDoc getMBeanType() {
178         return WebServicesObjectName.PORTCOMPONENT_TYPE;
179     }
180
181     /**
182      * @return Returns the childs MBeans (if any)
183      */

184     protected List JavaDoc getChildsMBeans() {
185         return handlers;
186     }
187
188
189 }
190
Popular Tags