Package org.jboss.wsf.stack.cxf.client
Class ProviderImpl
- java.lang.Object
-
- jakarta.xml.ws.spi.Provider
-
- org.apache.cxf.jaxws.spi.ProviderImpl
-
- org.apache.cxf.jaxws22.spi.ProviderImpl
-
- org.jboss.wsf.stack.cxf.client.ProviderImpl
-
public class ProviderImpl extends org.apache.cxf.jaxws22.spi.ProviderImplA custom jakarta.xml.ws.spi.Provider implementation extending the CXF one while adding few customizations. The most important customization is on the CXF Bus used the Endpoint.publish() or client. In particular, when a client is created, the thread default bus, thread context classloader bus and the bus used for the client being created depend on the selected strategy: * THREAD_BUS strategy Bus used for client ======================================= | | Client Bus | ======================================= | Default | NULL | New bus (Z) | | Thread |-------------------------| | Bus | Bus X | Bus X | ======================================= State of buses before and after client creation ======================================= | Bus | BEFORE | AFTER | ======================================= | Default | NULL | New bus (Z) | | Thread |--------------------------| | Bus | Bus X | Bus X | ======================================= | TCCL | NULL | NULL | | Bus |--------------------------| | | Bus Y | Bus Y | ======================================= * NEW_BUS strategy Bus used for client ======================================= | | Client Bus | ======================================= | Default | NULL | New bus | | Thread |-------------------------| | Bus | Bus X | New bus | ======================================= State of buses before and after client creation ======================================= | Bus | BEFORE | AFTER | ======================================= | Default | NULL | NULL | | Thread |--------------------------| | Bus | Bus X | Bus X | ======================================= | TCCL | NULL | NULL | | Bus |--------------------------| | | Bus Y | Bus Y | ======================================= * TCCL_BUS strategy Bus used for client ======================================= | | Client Bus | ======================================= | TCCL | NULL | New bus (Z) | | Bus |-------------------------| | | Bus Y | Bus Y | ======================================= State of buses before and after client creation ======================================= | Bus | BEFORE | AFTER | ======================================= | Default | NULL | NULL | | Thread |--------------------------| | Bus | Bus X | Bus X | ======================================= | TCCL | NULL | New bus (Z) | | Bus |--------------------------| | | Bus Y | Bus Y | ======================================= This class also ensures a proper context classloader is set (required on JBoss AS 7, as the TCCL does not include implementation classes by default)- Since:
- 27-Aug-2010
- Author:
- alessio.soldano@jboss.com
-
-
Constructor Summary
Constructors Constructor Description ProviderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EndpointcreateEndpoint(String bindingId, Class<?> implementorClass, Invoker invoker, WebServiceFeature... features)Creates an endpoint object with the provided binding, implementation class, invoker and web service features.EndpointcreateEndpoint(String bindingId, Object implementor)Creates an endpoint object with the provided binding and implementation object.EndpointcreateEndpoint(String bindingId, Object implementor, WebServiceFeature... features)Creates an endpoint object with the provided binding, implementation object and web service features.protected org.apache.cxf.jaxws.EndpointImplcreateEndpointImpl(Bus bus, String bindingId, Object implementor, WebServiceFeature... features)ServiceDelegatecreateServiceDelegate(URL url, QName qname, Class cls)Creates a service delegate object.ServiceDelegatecreateServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class serviceClass, WebServiceFeature... features)Creates a service delegate object.
-
-
-
Method Detail
-
createEndpointImpl
protected org.apache.cxf.jaxws.EndpointImpl createEndpointImpl(Bus bus, String bindingId, Object implementor, WebServiceFeature... features)
- Overrides:
createEndpointImplin classorg.apache.cxf.jaxws.spi.ProviderImpl
-
createEndpoint
public Endpoint createEndpoint(String bindingId, Object implementor)
Description copied from class:ProviderCreates an endpoint object with the provided binding and implementation object.- Overrides:
createEndpointin classorg.apache.cxf.jaxws.spi.ProviderImpl- Parameters:
bindingId- A URI specifying the desired binding (e.g. SOAP/HTTP)implementor- A service implementation object to which incoming requests will be dispatched. The corresponding class MUST be annotated with all the necessary Web service annotations.- Returns:
- The newly created endpoint.
-
createEndpoint
public Endpoint createEndpoint(String bindingId, Object implementor, WebServiceFeature... features)
Description copied from class:ProviderCreates an endpoint object with the provided binding, implementation object and web service features.Providerimplementations must override the default implementation.- Overrides:
createEndpointin classorg.apache.cxf.jaxws.spi.ProviderImpl- Parameters:
bindingId- A URI specifying the desired binding (e.g. SOAP/HTTP)implementor- A service implementation object to which incoming requests will be dispatched. The corresponding class MUST be annotated with all the necessary Web service annotations.features- A list of WebServiceFeatures to configure on the endpoint. Supported features not in thefeaturesparameter will have their default values.- Returns:
- The newly created endpoint.
-
createEndpoint
public Endpoint createEndpoint(String bindingId, Class<?> implementorClass, Invoker invoker, WebServiceFeature... features)
Description copied from class:ProviderCreates an endpoint object with the provided binding, implementation class, invoker and web service features. Containers typically use this to create Endpoint objects.Providerimplementations must override the default implementation.- Overrides:
createEndpointin classorg.apache.cxf.jaxws.spi.ProviderImpl- Parameters:
bindingId- A URI specifying the desired binding (e.g. SOAP/HTTP). Can be null.implementorClass- A service implementation class that MUST be annotated with all the necessary Web service annotations.invoker- that does the actual invocation on the service instance.features- A list of WebServiceFeatures to configure on the endpoint. Supported features not in thefeaturesparameter will have their default values.- Returns:
- The newly created endpoint.
-
createServiceDelegate
public ServiceDelegate createServiceDelegate(URL url, QName qname, Class cls)
Description copied from class:ProviderCreates a service delegate object.- Overrides:
createServiceDelegatein classorg.apache.cxf.jaxws.spi.ProviderImpl- Parameters:
url- A URL pointing to the WSDL document for the service, ornullif there isn't one.qname- The qualified name of the service.cls- The service class, which MUST be eitherjakarta.xml.ws.Serviceor a subclass thereof.- Returns:
- The newly created service delegate.
-
createServiceDelegate
public ServiceDelegate createServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class serviceClass, WebServiceFeature... features)
Description copied from class:ProviderCreates a service delegate object.- Overrides:
createServiceDelegatein classorg.apache.cxf.jaxws.spi.ProviderImpl- Parameters:
wsdlDocumentLocation- A URL pointing to the WSDL document for the service, ornullif there isn't one.serviceName- The qualified name of the service.serviceClass- The service class, which MUST be eitherjakarta.xml.ws.Serviceor a subclass thereof.features- Web Service features that must be configured on the service. If the provider doesn't understand a feature, it must throw a WebServiceException.- Returns:
- The newly created service delegate.
-
-