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.ProviderImpl
A 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
-
Field Summary
Fields inherited from class org.apache.cxf.jaxws.spi.ProviderImpl
JAXWS_PROVIDER, LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateEndpoint(String bindingId, Class<?> implementorClass, Invoker invoker, WebServiceFeature... features) Creates an endpoint object with the provided binding, implementation class, invoker and web service features.createEndpoint(String bindingId, Object implementor) Creates an endpoint object with the provided binding and implementation object.createEndpoint(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) createServiceDelegate(URL url, QName qname, Class cls) Creates a service delegate object.createServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class serviceClass, WebServiceFeature... features) Creates a service delegate object.Methods inherited from class org.apache.cxf.jaxws.spi.ProviderImpl
convertToInternal, createAndPublishEndpoint, createAndPublishEndpoint, createW3CEndpointReference, createW3CEndpointReference, getPort, readEndpointReference
-
Constructor Details
-
ProviderImpl
public ProviderImpl()
-
-
Method Details
-
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
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
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
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.
-