Search in sources :

Example 11 with BlueprintNameSpaceHandlerFactory

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

the class CXFActivator method start.

/**
 * {@inheritDoc}
 */
public void start(BundleContext context) throws Exception {
    workQueues = new ManagedWorkQueueList();
    cxfBundleListener = new CXFExtensionBundleListener(context.getBundle().getBundleId());
    context.addBundleListener(cxfBundleListener);
    cxfBundleListener.registerExistingBundles(context);
    configAdminTracker = new ServiceTracker<>(context, ConfigurationAdmin.class, null);
    configAdminTracker.open();
    workQueues.setConfigAdminTracker(configAdminTracker);
    workQueueServiceRegistration = registerManagedServiceFactory(context, ManagedServiceFactory.class, workQueues, ManagedWorkQueueList.FACTORY_PID);
    extensions = new ArrayList<>();
    extensions.add(createOsgiBusListenerExtension(context));
    extensions.add(createManagedWorkQueueListExtension(workQueues));
    ExtensionRegistry.addExtensions(extensions);
    BlueprintNameSpaceHandlerFactory factory = new BlueprintNameSpaceHandlerFactory() {

        @Override
        public Object createNamespaceHandler() {
            return new CXFAPINamespaceHandler();
        }
    };
    NamespaceHandlerRegisterer.register(context, factory, "http://cxf.apache.org/blueprint/core", "http://cxf.apache.org/configuration/beans", "http://cxf.apache.org/configuration/parameterized-types", "http://cxf.apache.org/configuration/security", "http://schemas.xmlsoap.org/wsdl/", "http://www.w3.org/2005/08/addressing", "http://schemas.xmlsoap.org/ws/2004/08/addressing");
}
Also used : BlueprintNameSpaceHandlerFactory(org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory) CXFAPINamespaceHandler(org.apache.cxf.internal.CXFAPINamespaceHandler) ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin) ManagedServiceFactory(org.osgi.service.cm.ManagedServiceFactory)

Example 12 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 SoapBindingBPHandler();
            }
        };
        NamespaceHandlerRegisterer.register(context, factory, "http://cxf.apache.org/blueprint/bindings/soap");
    } catch (NoClassDefFoundError error) {
    // No Blueprint is available
    }
}
Also used : BlueprintNameSpaceHandlerFactory(org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory)

Example 13 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 ClusteringBPNamespaceHandler();
            }
        };
        NamespaceHandlerRegisterer.register(context, factory, "http://cxf.apache.org/clustering");
    } catch (NoClassDefFoundError error) {
    // No Blueprint is available
    }
}
Also used : BlueprintNameSpaceHandlerFactory(org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory)

Example 14 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 HttpNettyTransportNamespaceHandler();
            }
        };
        NamespaceHandlerRegisterer.register(context, factory, "http://cxf.apache.org/transports/http-netty-server/configuration");
    } catch (NoClassDefFoundError error) {
    // No Blueprint is available
    }
}
Also used : BlueprintNameSpaceHandlerFactory(org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory)

Example 15 with BlueprintNameSpaceHandlerFactory

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

the class HTTPJettyTransportActivator method start.

public void start(BundleContext ctx) throws Exception {
    this.context = ctx;
    reg = context.registerService(ManagedServiceFactory.class, 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 HTTPJettyTransportNamespaceHandler();
            }
        };
        NamespaceHandlerRegisterer.register(context, nsHandlerFactory, "http://cxf.apache.org/transports/http-jetty/configuration");
    } catch (NoClassDefFoundError e) {
    // Blueprint not available, ignore
    }
}
Also used : BlueprintNameSpaceHandlerFactory(org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory) HTTPJettyTransportNamespaceHandler(org.apache.cxf.transport.http_jetty.blueprint.HTTPJettyTransportNamespaceHandler) ManagedServiceFactory(org.osgi.service.cm.ManagedServiceFactory) MBeanServer(javax.management.MBeanServer)

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