Class 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
    • Constructor Detail

      • ProviderImpl

        public ProviderImpl()
    • Method Detail

      • createEndpointImpl

        protected org.apache.cxf.jaxws.EndpointImpl createEndpointImpl​(Bus bus,
                                                                       String bindingId,
                                                                       Object implementor,
                                                                       WebServiceFeature... features)
        Overrides:
        createEndpointImpl in class org.apache.cxf.jaxws.spi.ProviderImpl
      • createEndpoint

        public Endpoint createEndpoint​(String bindingId,
                                       Object implementor)
        Description copied from class: Provider
        Creates an endpoint object with the provided binding and implementation object.
        Overrides:
        createEndpoint in class org.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: Provider
        Creates an endpoint object with the provided binding, implementation object and web service features. Provider implementations must override the default implementation.
        Overrides:
        createEndpoint in class org.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 the features parameter 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: Provider
        Creates an endpoint object with the provided binding, implementation class, invoker and web service features. Containers typically use this to create Endpoint objects. Provider implementations must override the default implementation.
        Overrides:
        createEndpoint in class org.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 the features parameter will have their default values.
        Returns:
        The newly created endpoint.
      • createServiceDelegate

        public ServiceDelegate createServiceDelegate​(URL url,
                                                     QName qname,
                                                     Class cls)
        Description copied from class: Provider
        Creates a service delegate object.
        Overrides:
        createServiceDelegate in class org.apache.cxf.jaxws.spi.ProviderImpl
        Parameters:
        url - A URL pointing to the WSDL document for the service, or null if there isn't one.
        qname - The qualified name of the service.
        cls - The service class, which MUST be either jakarta.xml.ws.Service or 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: Provider
        Creates a service delegate object.
        Overrides:
        createServiceDelegate in class org.apache.cxf.jaxws.spi.ProviderImpl
        Parameters:
        wsdlDocumentLocation - A URL pointing to the WSDL document for the service, or null if there isn't one.
        serviceName - The qualified name of the service.
        serviceClass - The service class, which MUST be either jakarta.xml.ws.Service or 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.