org.objectweb.jonas_ws.deployment.api
Class ServiceRefDesc

java.lang.Object
  extended byorg.objectweb.jonas_ws.deployment.api.ServiceRefDesc

public class ServiceRefDesc
extends java.lang.Object

A ServiceRefDesc describe a dependancy from a J2EE component onto a WebService (it is a Web Service Client). The component will have the hability to lookup the Service Implementation and use it.

Author:
Guillaume Sauthier, Xavier Delplanque

Constructor Summary
ServiceRefDesc(java.lang.ClassLoader classLoader, ServiceRef sref, JonasServiceRef jsref, java.lang.String filename)
          Creates a new ServiceRefDesc object.
 
Method Summary
 boolean equals(java.lang.Object other)
          Return true if the parameter is a ServiceRefDesc and if it equals this object.
 java.util.List getHandlerRefs()
          Return the list of Handler.
 java.lang.String getJndiName()
          Return the serviceRef jndi name
 MappingFile getMappingFile()
          Return the MappingFile object.
 java.lang.String getParam(java.lang.String name)
          Return the value of the specified parameter
 java.util.Hashtable getParams()
          Return all the params of the ServiceRefDesc as an Hashtable.
 java.util.List getPortComponentRefs()
          Return the list of PortComponentRef.
 java.lang.Class getServiceClass()
          Return the implementaion class of the Service Interface.
 java.lang.Class getServiceInterface()
          Return the Class object representing the service-interface.
 javax.xml.namespace.QName getServiceQName()
          Return the QName identifying the service in the WSDL. can return null if WSDL not defined.
 java.lang.String getServiceRefName()
          Return the name used for Service interface lookup.
 WSDLFile getWSDLFile()
          Return the WSDLFile object describing the WebService.
 java.lang.String getWsdlFileName()
          Return the name of WSDL inside of the module.
 boolean isJndiRef()
          Return true if the service-ref is only a reference on another service-ref.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceRefDesc

public ServiceRefDesc(java.lang.ClassLoader classLoader,
                      ServiceRef sref,
                      JonasServiceRef jsref,
                      java.lang.String filename)
               throws WSDeploymentDescException
Creates a new ServiceRefDesc object.

Parameters:
classLoader - web class loader
sref - generated object containing service-ref informations.
jsref - JOnAS specific service-ref informations.
filename - the name of the archive where retrieve WSDL and mapping files
Throws:
WSDeploymentDescException - if the wsdl file is undefined or if informations in wsdl and handler doesn't match.
Method Detail

getPortComponentRefs

public java.util.List getPortComponentRefs()
Return the list of PortComponentRef.

Returns:
the list of PortComponentRef

getHandlerRefs

public java.util.List getHandlerRefs()
Return the list of Handler.

Returns:
the list of Handler

getServiceRefName

public java.lang.String getServiceRefName()
Return the name used for Service interface lookup.

Returns:
the service-ref-name value

getServiceInterface

public java.lang.Class getServiceInterface()
Return the Class object representing the service-interface.

Returns:
the Class object representing the service-interface.

getWSDLFile

public WSDLFile getWSDLFile()
Return the WSDLFile object describing the WebService.

Returns:
the WSDLFile object describing the WebService.

getMappingFile

public MappingFile getMappingFile()
Return the MappingFile object.

Returns:
the MappingFile object.

getServiceClass

public java.lang.Class getServiceClass()
Return the implementaion class of the Service Interface. Can be null if serviceClassName has not been set (GenIC/WsGen case) in jonas-init-param because the class has not been generated at this time.

Returns:
the implementaion class of the Service Interface.

getParams

public java.util.Hashtable getParams()
Return all the params of the ServiceRefDesc as an Hashtable.

Returns:
all the params of the ServiceRefDesc as an Hashtable.

getParam

public java.lang.String getParam(java.lang.String name)
Return the value of the specified parameter

Parameters:
name - the parameter to retrieve
Returns:
the value of the specified parameter

getJndiName

public java.lang.String getJndiName()
Return the serviceRef jndi name

Returns:
the value of the specified parameter

isJndiRef

public boolean isJndiRef()
Return true if the service-ref is only a reference on another service-ref.

Returns:
true if the service-ref is only a reference on another service-ref.

getWsdlFileName

public java.lang.String getWsdlFileName()
Return the name of WSDL inside of the module.

Returns:
the name of WSDL inside of the module

getServiceQName

public javax.xml.namespace.QName getServiceQName()
Return the QName identifying the service in the WSDL. can return null if WSDL not defined.

Returns:
Return the QName identifying the service in the WSDL (can be null).

equals

public boolean equals(java.lang.Object other)
Return true if the parameter is a ServiceRefDesc and if it equals this object. Return false else.

Parameters:
other - the object to compare
Returns:
true if objects are equals