org.ow2.jonas.deployment.ws
Class ServiceRefDesc

java.lang.Object
  extended by org.ow2.jonas.deployment.ws.ServiceRefDesc
All Implemented Interfaces:
IServiceRefDesc

public class ServiceRefDesc
extends Object
implements IServiceRefDesc

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(ClassLoader classLoader, ServiceRef sref, JonasServiceRef jsref, String filename)
          Creates a new ServiceRefDesc object.
 
Method Summary
 boolean equals(Object other)
          Return true if the parameter is a ServiceRefDesc and if it equals this object.
 URL getAlternateWsdlURL()
           
 List getHandlerRefs()
          Return the list of Handler.
protected static I18n getI18n()
           
 URL getLocalWSDLURL()
           
 MappingFile getMappingFile()
           
 URL getMappingFileURL()
           
 String getParam(String name)
          Return the value of the specified parameter.
 Hashtable getParams()
          Return all the params of the ServiceRefDesc as an Hashtable.
 List getPortComponentRefs()
          Return the list of PortComponentRef.
 Class getServiceInterface()
          Return the Class object representing the service-interface.
 QName getServiceQName()
          Return the QName identifying the service in the WSDL.
 String getServiceRefName()
          Return the name used for Service interface lookup.
 WSDLFile getWSDLFile()
           
 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(ClassLoader classLoader,
                      ServiceRef sref,
                      JonasServiceRef jsref,
                      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 List getPortComponentRefs()
Description copied from interface: IServiceRefDesc
Return the list of PortComponentRef.

Specified by:
getPortComponentRefs in interface IServiceRefDesc
Returns:
the list of PortComponentRef

getHandlerRefs

public List getHandlerRefs()
Description copied from interface: IServiceRefDesc
Return the list of Handler.

Specified by:
getHandlerRefs in interface IServiceRefDesc
Returns:
the list of Handler

getServiceRefName

public String getServiceRefName()
Description copied from interface: IServiceRefDesc
Return the name used for Service interface lookup.

Specified by:
getServiceRefName in interface IServiceRefDesc
Returns:
the service-ref-name value

getServiceInterface

public Class getServiceInterface()
Description copied from interface: IServiceRefDesc
Return the Class object representing the service-interface.

Specified by:
getServiceInterface in interface IServiceRefDesc
Returns:
the Class object representing the service-interface.

getWSDLFile

public WSDLFile getWSDLFile()

getMappingFile

public MappingFile getMappingFile()

getParams

public Hashtable getParams()
Description copied from interface: IServiceRefDesc
Return all the params of the ServiceRefDesc as an Hashtable.

Specified by:
getParams in interface IServiceRefDesc
Returns:
all the params of the ServiceRefDesc as an Hashtable.

getParam

public String getParam(String name)
Description copied from interface: IServiceRefDesc
Return the value of the specified parameter.

Specified by:
getParam in interface IServiceRefDesc
Parameters:
name - the parameter to retrieve
Returns:
the value of the specified parameter

getWsdlFileName

public String getWsdlFileName()
Description copied from interface: IServiceRefDesc
Return the name of WSDL inside of the module.

Specified by:
getWsdlFileName in interface IServiceRefDesc
Returns:
the name of WSDL inside of the module

getServiceQName

public QName getServiceQName()
Description copied from interface: IServiceRefDesc
Return the QName identifying the service in the WSDL. can return null if WSDL not defined.

Specified by:
getServiceQName in interface IServiceRefDesc
Returns:
Return the QName identifying the service in the WSDL (can be null).

hashCode

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

equals

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

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

getI18n

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

getAlternateWsdlURL

public URL getAlternateWsdlURL()
Specified by:
getAlternateWsdlURL in interface IServiceRefDesc
Returns:
Returns the alternate WSDL URL (may be null).

getLocalWSDLURL

public URL getLocalWSDLURL()
Specified by:
getLocalWSDLURL in interface IServiceRefDesc
Returns:
Returns the URL where the uptodate WSDL can be found.

getMappingFileURL

public URL getMappingFileURL()
Specified by:
getMappingFileURL in interface IServiceRefDesc
Returns:
Returns the URL where the mapping file can be found.


Copyright © 2010 OW2 Consortium. All Rights Reserved.