org.objectweb.jonas_ws.deployment.api
Class ServiceRefDesc

java.lang.Object
  extended by org.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.net.URL getAlternateWsdlURL()
           
 java.util.List getHandlerRefs()
          Return the list of Handler.
protected static I18n getI18n()
           
 java.net.URL getLocalWSDLURL()
           
 MappingFile getMappingFile()
          Return the MappingFile object.
 java.net.URL getMappingFileURL()
           
 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 getServiceInterface()
          Return the Class object representing the service-interface.
 javax.xml.namespace.QName getServiceQName()
          Return the QName identifying the service in the WSDL.
 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.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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.

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

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).

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
String.hashCode()

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.

Overrides:
equals in class java.lang.Object
Parameters:
other - the object to compare
Returns:
true if objects are equals

getI18n

protected static I18n getI18n()
Returns:
Returns the i18n.

getAlternateWsdlURL

public java.net.URL getAlternateWsdlURL()
Returns:
Returns the alternate WSDL URL (may be null).

getLocalWSDLURL

public java.net.URL getLocalWSDLURL()
Returns:
Returns the URL where the uptodate WSDL can be found.

getMappingFileURL

public java.net.URL getMappingFileURL()
Returns:
Returns the URL where the mapping file can be found.