View Javadoc

1    /****************************************************************************
2    * Copyright (c) 2005, 2006, 2007, 2008, 2009 Imola Informatica.
3    * All rights reserved. This program and the accompanying materials
4    * are made available under the terms of the LGPL License v2.1
5    * which accompanies this distribution, and is available at
6    * http://www.gnu.org/licenses/lgpl.html
7    ****************************************************************************/
8   package it.imolinfo.jbi4corba.webservice.descriptor;
9   
10  import it.imolinfo.jbi4corba.jbi.JbiServiceDescriptor;
11  import it.imolinfo.jbi4corba.jbi.endpoint.ConsumerEndpoint;
12  import it.imolinfo.jbi4corba.webservice.generator.ServerCorbaClassesHolder;
13  import it.imolinfo.jbi4corba.webservice.runtime.ConsumerInvocationHandler;
14  import it.imolinfo.jbi4corba.webservice.runtime.RuntimeInformation;
15  
16  import java.util.Properties;
17  
18  import javax.jbi.servicedesc.ServiceEndpoint;
19  import javax.wsdl.Definition;
20  import javax.xml.namespace.QName;
21  
22  import org.apache.commons.lang.builder.EqualsBuilder;
23  import org.apache.commons.lang.builder.ReflectionToStringBuilder;
24  import org.omg.CORBA.ORB;
25  import org.omg.PortableServer.Servant;
26  
27  /**
28   * @author raffaele
29   *
30   */
31  public class ConsumerServiceDescriptor {
32    //configuration
33    private long timeout;
34    private String rootPath;
35    private String componentRootPath;
36    
37      //proxied endpoint
38    private String targetEndpoint;
39    private QName targetService;
40    private QName targetInterfaceName;
41    
42      //corba
43    private Properties orbProperties;
44    private String serviceName;      
45    private String localizationType;
46    private String corbaServiceName;
47    private Boolean persistent=false;
48  
49  
50    //runtime
51    private ConsumerInvocationHandler consumerInvocationHandler; 
52    private String wsdlFileName;
53    private ConsumerEndpoint endpoint;  
54    private RuntimeInformation runtimeInformation;
55    
56      //proxied endpoint
57    private ServiceEndpoint proxiedService;
58    
59      //corba
60    private ServerCorbaClassesHolder serverCorbaClassesHolder;  
61    private ORB orb;
62    private Servant poaTie;     
63    
64    private Definition serviceWSDLDefinition;
65    private JbiServiceDescriptor jbiServiceDescriptor;
66  
67    /**
68     * Default constructor.
69     */
70    public ConsumerServiceDescriptor(){  
71    }
72    
73   /**
74    * @return  The return
75    */
76    public ServerCorbaClassesHolder getServerCorbaClassesHolder() {
77      return serverCorbaClassesHolder;
78    }
79  
80    /**
81     * 
82     * @param serverCorbaClassesHolder  The server corba classes holder
83     */
84    public void setServerCorbaClassesHolder(ServerCorbaClassesHolder serverCorbaClassesHolder) {
85      this.serverCorbaClassesHolder = serverCorbaClassesHolder;
86    }
87  
88    /**
89     * 
90     * @return  The return
91     */
92    public Properties getOrbProperties() {
93      return orbProperties;
94    }
95  
96    /**
97     * 
98     * @param orbProperties  The orb properties
99     */
100   public void setOrbProperties(Properties orbProperties) {
101     this.orbProperties = orbProperties;
102   }
103 
104   /**
105    * 
106    * @return  The return
107    */
108   public ORB getOrb() {
109     return orb;
110   }
111 
112   /**
113    * 
114    * @param orb  The orb
115    */
116   public void setOrb(ORB orb) {
117     this.orb = orb;
118   }
119 
120   /**
121    * 
122    * @return  The return
123    */
124   public Servant getPoaTie() {
125     return poaTie;
126   }
127 
128   /**
129    * 
130    * @param poaTie  The servant
131    */
132   public void setPoaTie(Servant poaTie) {
133     this.poaTie = poaTie;
134   }
135 
136   /**
137    * 
138    * @return  The return
139    */
140   public ConsumerInvocationHandler getConsumerInvocationHandler() {
141     return consumerInvocationHandler;
142   }
143 
144   /**
145    * 
146    * @param consumerInvocationHandler  The consumer invocation handler
147    */
148   public void setConsumerInvocationHandler(ConsumerInvocationHandler consumerInvocationHandler) {
149     this.consumerInvocationHandler = consumerInvocationHandler;
150   }
151  
152   /**
153    * @return  The return
154    */
155   @Override
156   public String toString() {
157     return ReflectionToStringBuilder.toString(this);
158   }
159 
160   /**
161    * @param obj  The object
162    * @return     The return
163    */
164   @Override
165   public boolean equals(Object obj) {
166     return EqualsBuilder.reflectionEquals(this, obj);
167 
168   }
169 
170   /**
171    * @return  The return
172    */
173   public String getServiceName() {
174     return serviceName;
175   }
176 
177   /**
178    * 
179    * @param serviceName  The service name
180    */
181   public void setServiceName(String serviceName) {
182     this.serviceName = serviceName;
183   }
184 
185   /**
186    * @return  The return
187    */
188   public ServiceEndpoint getProxiedService() {
189     return proxiedService;
190   }
191 
192   /**
193    * 
194    * @param proxiedService  The proxied service
195    */
196   public void setProxiedService(ServiceEndpoint proxiedService) {
197     this.proxiedService = proxiedService;
198   }
199 
200   /**
201    * @return  The return
202    */
203   public String getTargetEndpoint() {
204     return targetEndpoint;
205   }
206 
207   /**
208    * 
209    * @param targetEndpoint  The target endpoint
210    */
211   public void setTargetEndpoint(String targetEndpoint) {
212     this.targetEndpoint = targetEndpoint;
213   }
214 
215   /**
216    * @return  The return
217    */
218   public QName getTargetInterfaceName() {
219     return targetInterfaceName;
220   }
221 
222   /**
223    * 
224    * @param targetInterfaceName  The target interface name
225    */
226   public void setTargetInterfaceName(QName targetInterfaceName) {
227     this.targetInterfaceName = targetInterfaceName;
228   }
229 
230   /**
231    * @return  The return
232    */
233   public QName getTargetService() {
234     return targetService;
235   }
236 
237   /**
238    * 
239    * @param targetService  The target service
240    */
241   public void setTargetService(QName targetService) {
242     this.targetService = targetService;
243   }
244 
245   /**
246    * @return  The return
247    */
248   public String getWsdlFileName() {
249     return wsdlFileName;
250   }
251 
252   /**
253    * 
254    * @param wsdlFileName  The wsdl file name
255    */
256   public void setWsdlFileName(String wsdlFileName) {
257     this.wsdlFileName = wsdlFileName;
258   }
259 
260   /**
261    * @return  The return
262    */
263   public ConsumerEndpoint getEndpoint() {
264     return endpoint;
265   }
266 
267   /**
268    * 
269    * @param endpoint  The end point
270    */
271   public void setEndpoint(ConsumerEndpoint endpoint) {
272     this.endpoint = endpoint;
273   }
274 
275   /**
276    * @return  The return
277    */
278   public long getTimeout() {
279     return timeout;
280   }
281 
282   /**
283    * 
284    * @param timeout  The timeout
285    */
286   public void setTimeout(long timeout) {
287     this.timeout = timeout;
288   }
289 
290   /**
291    * @return  The return
292    */
293   public String getRootPath() {
294     return rootPath;
295   }
296 
297   /**
298    * 
299    * @param rootPath  The root path
300    */
301   public void setRootPath(String rootPath) {
302     this.rootPath = rootPath;
303   }
304 
305   /**
306    * @return  The return
307    */
308   public String getLocalizationType() {
309     return localizationType;
310   }
311 
312   /**
313    * 
314    * @param localizationType  The localization type
315    */
316   public void setLocalizationType(String localizationType) {
317     this.localizationType = localizationType;
318   }
319 
320   /**
321    * @return  The return
322    */
323   public String getComponentRootPath() {
324     return componentRootPath;
325   }
326   
327   /**
328    * 
329    * @param componentRootPath  The component root path
330    */
331   public void setComponentRootPath(String componentRootPath) {
332     this.componentRootPath = componentRootPath;
333   }
334 
335   /**
336    * @return  The return
337    */
338   public String getCorbaServiceName() {
339       return corbaServiceName;
340   }
341 
342   /**
343    * 
344    * @param corbaServiceName  The corba service name
345    */
346   public void setCorbaServiceName(String corbaServiceName) {
347       this.corbaServiceName = corbaServiceName;
348   } 
349   
350   /**
351    * @return  The return
352    */
353   public Definition getServiceWSDLDefinition() {
354       return serviceWSDLDefinition;
355   }
356 
357   /**
358    * 
359    * @param serviceWSDLDefinition  The service WSDL definition
360    */
361   public void setServiceWSDLDefinition(Definition serviceWSDLDefinition) {
362       this.serviceWSDLDefinition = serviceWSDLDefinition;
363   }  
364   
365   /**
366    * @return  The return
367    */
368   public JbiServiceDescriptor getJbiServiceDescriptor() {
369 	  return jbiServiceDescriptor;
370   }
371 
372   /**
373    * 
374    * @param jbiServiceDescriptor  Maps the configurations read from the WSDL
375    */    
376   public void setJbiServiceDescriptor(JbiServiceDescriptor jbiServiceDescriptor) {
377 	  this.jbiServiceDescriptor = jbiServiceDescriptor;
378   }  
379  
380   public RuntimeInformation getRuntimeInformation() {
381 	  return runtimeInformation;
382   }
383 
384   public void setRuntimeInformation(RuntimeInformation runtimeInformation) {
385 	  this.runtimeInformation = runtimeInformation;
386   }
387 
388       public Boolean isPersistent() {
389         return persistent;
390     }
391 
392     public void setPersistent(Boolean persistent) {
393         this.persistent = persistent;
394     }
395 
396 }