org.apache.axis2.jaxws.spi
Class ServiceDelegate

java.lang.Object
  extended by javax.xml.ws.spi.ServiceDelegate
      extended by org.apache.axis2.jaxws.spi.ServiceDelegate

public class ServiceDelegate
extends ServiceDelegate

The ServiceDelegate serves as the backing implementation for all of the methods in the Service API. This is the plug point for the client implementation.


Constructor Summary
ServiceDelegate(java.net.URL url, QName qname, java.lang.Class clazz)
           
 
Method Summary
 void addPort(QName portName, java.lang.String bindingId, java.lang.String endpointAddress)
           
<T> Dispatch<T>
createDispatch(EndpointReference jaxwsEPR, java.lang.Class<T> type, Service.Mode mode, WebServiceFeature... features)
           
 Dispatch<java.lang.Object> createDispatch(EndpointReference jaxwsEPR, javax.xml.bind.JAXBContext context, Service.Mode mode, WebServiceFeature... features)
           
<T> Dispatch<T>
createDispatch(QName portName, java.lang.Class<T> type, Service.Mode mode)
           
<T> Dispatch<T>
createDispatch(QName portName, java.lang.Class<T> type, Service.Mode mode, WebServiceFeature... features)
           
 Dispatch<java.lang.Object> createDispatch(QName portName, javax.xml.bind.JAXBContext context, Service.Mode mode)
           
 Dispatch<java.lang.Object> createDispatch(QName portName, javax.xml.bind.JAXBContext context, Service.Mode mode, WebServiceFeature... features)
           
 java.util.concurrent.Executor getExecutor()
           
 HandlerResolver getHandlerResolver()
           
<T> T
getPort(java.lang.Class<T> sei)
           
<T> T
getPort(java.lang.Class<T> sei, WebServiceFeature... features)
           
<T> T
getPort(EndpointReference jaxwsEPR, java.lang.Class<T> sei, WebServiceFeature... features)
           
<T> T
getPort(EndpointReference axis2EPR, java.lang.String addressingNamespace, java.lang.Class<T> sei, WebServiceFeature... features)
           
<T> T
getPort(QName portName, java.lang.Class<T> sei)
           
<T> T
getPort(QName portName, java.lang.Class<T> sei, WebServiceFeature... features)
           
 java.util.Iterator<QName> getPorts()
           
 ServiceClient getServiceClient(QName portQName)
           
 ServiceDescription getServiceDescription()
          Get the ServiceDescription tree that this ServiceDelegate
 QName getServiceName()
           
 java.net.URL getWSDLDocumentLocation()
           
 void setExecutor(java.util.concurrent.Executor e)
           
 void setHandlerResolver(HandlerResolver handlerresolver)
           
static void setPortMetadata(DescriptionBuilderComposite composite)
          NON-STANDARD SPI! Set any metadata to be used on the creation of the NEXT Port by this thread.
static void setServiceMetadata(DescriptionBuilderComposite composite)
          NON-STANDARD SPI! Set any metadata to be used on the creation of the NEXT Service by this thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceDelegate

public ServiceDelegate(java.net.URL url,
                       QName qname,
                       java.lang.Class clazz)
                throws WebServiceException
Throws:
WebServiceException
Method Detail

setServiceMetadata

public static void setServiceMetadata(DescriptionBuilderComposite composite)
NON-STANDARD SPI! Set any metadata to be used on the creation of the NEXT Service by this thread. NOTE that this uses ThreadLocal to store the metadata, and that ThreadLocal is cleared after it is used to create a Service. That means: 1) The thread that sets the metadata to use MUST be the thread that creates the Service 2) Creation of the Service should be the very next thing the thread does 3) The metadata will be set to null when the Service is created, so to create another service with the same metadata, it will need to be set again prior to creating the service 4) The metadata can be set prior to creating both generic Service and generated Service instances. This allows creating a generic Service (javax.xml.ws.Service) or a generated Service (subclass of javax.xml.ws.Service) specifying additional metadata via a sparse composite. This can be used by a runtime to create a Service for a requester using additional metadata such as might come from a deployment descriptor or from resource injection processing of @Resource or @WebServiceRef(s) annotations. Additional metadata may include things like @WebServiceClient.wsdlLocation or a @HandlerChain specification.

Parameters:
composite - Additional metadata (if any) to be used in creation of the service
See Also:
Service.create(QName), Service.create(URL, QName)

setPortMetadata

public static void setPortMetadata(DescriptionBuilderComposite composite)
NON-STANDARD SPI! Set any metadata to be used on the creation of the NEXT Port by this thread. NOTE that this uses ThreadLocal to store the metadata, and that ThreadLocal is cleared after it is used to create a Port. That means: 1) The thread that sets the metadata to use MUST be the thread that creates the Port 2) Creation of the Port should be the very next thing the thread does 3) The metadata will be set to null when the Port is created, so to create another Port with the same metadata, it will need to be set again prior to creating the Port 4) The metadata can be set prior to creating Port which specifies a QName via Service.getPort(QName, Class) or one that only specifies the SEI class via Service.getPort(Class) 5) Metadata can not be specified for dynamic ports, i.e. those added via Service.addPort(...). 6) Metadata can not be specfied when creating a dispatch client, i.e. via Service.createDispatch(...) 7) The Service used to create the port can be the generic service or a generated service. This allows creating Port specifying additional metadata via a sparse composite. This can be used by a runtime to create a Port for a requester using additional metadata such as might come from a deployment descriptor or from resource injection processing. Additional metadata might include things like a @HandlerChain specification.

Parameters:
composite - Additional metadata (if any) to be used in creation of the port
See Also:
Service.getPort(Class), Service.getPort(QName, Class)

addPort

public void addPort(QName portName,
                    java.lang.String bindingId,
                    java.lang.String endpointAddress)
             throws WebServiceException
Specified by:
addPort in class ServiceDelegate
Throws:
WebServiceException

createDispatch

public <T> Dispatch<T> createDispatch(QName portName,
                                      java.lang.Class<T> type,
                                      Service.Mode mode)
                           throws WebServiceException
Specified by:
createDispatch in class ServiceDelegate
Throws:
WebServiceException

createDispatch

public Dispatch<java.lang.Object> createDispatch(QName portName,
                                                 javax.xml.bind.JAXBContext context,
                                                 Service.Mode mode)
Specified by:
createDispatch in class ServiceDelegate

createDispatch

public <T> Dispatch<T> createDispatch(EndpointReference jaxwsEPR,
                                      java.lang.Class<T> type,
                                      Service.Mode mode,
                                      WebServiceFeature... features)
Specified by:
createDispatch in class ServiceDelegate

createDispatch

public Dispatch<java.lang.Object> createDispatch(EndpointReference jaxwsEPR,
                                                 javax.xml.bind.JAXBContext context,
                                                 Service.Mode mode,
                                                 WebServiceFeature... features)
Specified by:
createDispatch in class ServiceDelegate

createDispatch

public <T> Dispatch<T> createDispatch(QName portName,
                                      java.lang.Class<T> type,
                                      Service.Mode mode,
                                      WebServiceFeature... features)
Specified by:
createDispatch in class ServiceDelegate

createDispatch

public Dispatch<java.lang.Object> createDispatch(QName portName,
                                                 javax.xml.bind.JAXBContext context,
                                                 Service.Mode mode,
                                                 WebServiceFeature... features)
Specified by:
createDispatch in class ServiceDelegate

getPort

public <T> T getPort(java.lang.Class<T> sei)
          throws WebServiceException
Specified by:
getPort in class ServiceDelegate
Throws:
WebServiceException

getPort

public <T> T getPort(QName portName,
                     java.lang.Class<T> sei)
          throws WebServiceException
Specified by:
getPort in class ServiceDelegate
Throws:
WebServiceException

getPort

public <T> T getPort(java.lang.Class<T> sei,
                     WebServiceFeature... features)
Specified by:
getPort in class ServiceDelegate

getPort

public <T> T getPort(EndpointReference jaxwsEPR,
                     java.lang.Class<T> sei,
                     WebServiceFeature... features)
Specified by:
getPort in class ServiceDelegate

getPort

public <T> T getPort(QName portName,
                     java.lang.Class<T> sei,
                     WebServiceFeature... features)
Specified by:
getPort in class ServiceDelegate

getExecutor

public java.util.concurrent.Executor getExecutor()
Specified by:
getExecutor in class ServiceDelegate

getHandlerResolver

public HandlerResolver getHandlerResolver()
Specified by:
getHandlerResolver in class ServiceDelegate

getPorts

public java.util.Iterator<QName> getPorts()
Specified by:
getPorts in class ServiceDelegate

getServiceName

public QName getServiceName()
Specified by:
getServiceName in class ServiceDelegate

getWSDLDocumentLocation

public java.net.URL getWSDLDocumentLocation()
Specified by:
getWSDLDocumentLocation in class ServiceDelegate

setExecutor

public void setExecutor(java.util.concurrent.Executor e)
Specified by:
setExecutor in class ServiceDelegate

setHandlerResolver

public void setHandlerResolver(HandlerResolver handlerresolver)
Specified by:
setHandlerResolver in class ServiceDelegate

getServiceDescription

public ServiceDescription getServiceDescription()
Get the ServiceDescription tree that this ServiceDelegate


getServiceClient

public ServiceClient getServiceClient(QName portQName)
                               throws WebServiceException
Throws:
WebServiceException

getPort

public <T> T getPort(EndpointReference axis2EPR,
                     java.lang.String addressingNamespace,
                     java.lang.Class<T> sei,
                     WebServiceFeature... features)


Copyright © 2007 Apache Web Services Project. All Rights Reserved.