Search in sources :

Example 1 with BlueprintNameSpaceHandlerFactory

use of org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory in project cxf by apache.

the class Activator method start.

@Override
public void start(BundleContext context) throws Exception {
    try {
        BlueprintNameSpaceHandlerFactory factory = new BlueprintNameSpaceHandlerFactory() {

            @Override
            public Object createNamespaceHandler() {
                return new JAXRSBPNamespaceHandler();
            }
        };
        NamespaceHandlerRegisterer.register(context, factory, "http://cxf.apache.org/blueprint/jaxrs");
    } catch (NoClassDefFoundError error) {
    // No Blueprint is available
    }
}
Also used : BlueprintNameSpaceHandlerFactory(org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory)

Example 2 with BlueprintNameSpaceHandlerFactory

use of org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory in project cxf by apache.

the class HTTPTransportActivator method start.

public void start(final BundleContext context) throws Exception {
    ConfigAdminHttpConduitConfigurer conduitConfigurer = new ConfigAdminHttpConduitConfigurer();
    registerService(context, ManagedServiceFactory.class, conduitConfigurer, ConfigAdminHttpConduitConfigurer.FACTORY_PID);
    registerService(context, HTTPConduitConfigurer.class, conduitConfigurer, "org.apache.cxf.http.conduit-configurer");
    if (PropertyUtils.isTrue(context.getProperty(DISABLE_DEFAULT_HTTP_TRANSPORT))) {
        // directly in the CXF_CONFIG_SCOPE properties file
        return;
    }
    DestinationRegistry destinationRegistry = new DestinationRegistryImpl();
    HTTPTransportFactory transportFactory = new HTTPTransportFactory(destinationRegistry);
    HttpServiceTrackerCust customizer = new HttpServiceTrackerCust(destinationRegistry, context);
    httpServiceTracker = new ServiceTracker<>(context, HttpService.class, customizer);
    httpServiceTracker.open();
    context.registerService(DestinationRegistry.class.getName(), destinationRegistry, null);
    context.registerService(HTTPTransportFactory.class.getName(), transportFactory, null);
    BlueprintNameSpaceHandlerFactory factory = new BlueprintNameSpaceHandlerFactory() {

        @Override
        public Object createNamespaceHandler() {
            return new HttpBPHandler();
        }
    };
    NamespaceHandlerRegisterer.register(context, factory, "http://cxf.apache.org/transports/http/configuration");
}
Also used : DestinationRegistry(org.apache.cxf.transport.http.DestinationRegistry) BlueprintNameSpaceHandlerFactory(org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory) HttpBPHandler(org.apache.cxf.transport.http.blueprint.HttpBPHandler) HttpService(org.osgi.service.http.HttpService) HTTPTransportFactory(org.apache.cxf.transport.http.HTTPTransportFactory) DestinationRegistryImpl(org.apache.cxf.transport.http.DestinationRegistryImpl)

Example 3 with BlueprintNameSpaceHandlerFactory

use of org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory in project cxf by apache.

the class HTTPUndertowTransportActivator method start.

public void start(BundleContext ctx) throws Exception {
    this.context = ctx;
    reg = context.registerService(ManagedServiceFactory.class.getName(), this, CollectionUtils.singletonDictionary(Constants.SERVICE_PID, FACTORY_PID));
    mbeanServerTracker = new ServiceTracker<>(ctx, MBeanServer.class, null);
    try {
        BlueprintNameSpaceHandlerFactory nsHandlerFactory = new BlueprintNameSpaceHandlerFactory() {

            @Override
            public Object createNamespaceHandler() {
                return new HTTPUndertowTransportNamespaceHandler();
            }
        };
        NamespaceHandlerRegisterer.register(context, nsHandlerFactory, "http://cxf.apache.org/transports/http-undertow/configuration");
    } catch (NoClassDefFoundError e) {
    // Blueprint not available, ignore
    }
}
Also used : BlueprintNameSpaceHandlerFactory(org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory) HTTPUndertowTransportNamespaceHandler(org.apache.cxf.transport.http_undertow.blueprint.HTTPUndertowTransportNamespaceHandler) MBeanServer(javax.management.MBeanServer)

Example 4 with BlueprintNameSpaceHandlerFactory

use of org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory in project cxf by apache.

the class Activator method start.

@Override
public void start(BundleContext context) throws Exception {
    try {
        BlueprintNameSpaceHandlerFactory factory = new BlueprintNameSpaceHandlerFactory() {

            @Override
            public Object createNamespaceHandler() {
                return new SimpleBPNamespaceHandler();
            }
        };
        NamespaceHandlerRegisterer.register(context, factory, "http://cxf.apache.org/blueprint/simple");
    } catch (NoClassDefFoundError error) {
    // No Blueprint is available
    }
}
Also used : BlueprintNameSpaceHandlerFactory(org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory)

Example 5 with BlueprintNameSpaceHandlerFactory

use of org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory in project cxf by apache.

the class Activator method start.

@Override
public void start(BundleContext context) throws Exception {
    try {
        BlueprintNameSpaceHandlerFactory factory = new BlueprintNameSpaceHandlerFactory() {

            @Override
            public Object createNamespaceHandler() {
                return new org.apache.cxf.jaxrs.client.blueprint.JAXRSBPNamespaceHandler();
            }
        };
        NamespaceHandlerRegisterer.register(context, factory, "http://cxf.apache.org/blueprint/jaxrs-client");
    } catch (NoClassDefFoundError error) {
    // No Blueprint is available
    }
}
Also used : BlueprintNameSpaceHandlerFactory(org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory)

Aggregations

BlueprintNameSpaceHandlerFactory (org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory)15 MBeanServer (javax.management.MBeanServer)2 ManagedServiceFactory (org.osgi.service.cm.ManagedServiceFactory)2 CXFAPINamespaceHandler (org.apache.cxf.internal.CXFAPINamespaceHandler)1 DestinationRegistry (org.apache.cxf.transport.http.DestinationRegistry)1 DestinationRegistryImpl (org.apache.cxf.transport.http.DestinationRegistryImpl)1 HTTPTransportFactory (org.apache.cxf.transport.http.HTTPTransportFactory)1 HttpBPHandler (org.apache.cxf.transport.http.blueprint.HttpBPHandler)1 HTTPJettyTransportNamespaceHandler (org.apache.cxf.transport.http_jetty.blueprint.HTTPJettyTransportNamespaceHandler)1 HTTPUndertowTransportNamespaceHandler (org.apache.cxf.transport.http_undertow.blueprint.HTTPUndertowTransportNamespaceHandler)1 ConfigurationAdmin (org.osgi.service.cm.ConfigurationAdmin)1 HttpService (org.osgi.service.http.HttpService)1