private <T> ServiceRegistration<T> registerService(BundleContext context, Class<T> serviceInterface, T serviceObject, String servicePid) { return context.registerService(serviceInterface, serviceObject, CollectionUtils.singletonDictionary(Constants.SERVICE_PID, servicePid)); }
@Override public HttpService addingService(ServiceReference<HttpService> reference) { HttpService httpService = context.getService(reference); Servlet servlet = new CXFNonSpringServlet(destinationRegistry, false); servletExporter = new ServletExporter(servlet, httpService); servletPublisherReg = context.registerService(ManagedService.class, servletExporter, CollectionUtils.singletonDictionary(Constants.SERVICE_PID, CXF_CONFIG_PID)); return httpService; } }
private <T> ServiceRegistration<T> registerManagedServiceFactory(BundleContext context, Class<T> serviceClass, T service, String servicePid) { return context.registerService(serviceClass, service, CollectionUtils.singletonDictionary(Constants.SERVICE_PID, servicePid)); }
private <T> ServiceRegistration<T> registerService(BundleContext context, Class<T> serviceInterface, T serviceObject, String servicePid) { return context.registerService(serviceInterface, serviceObject, CollectionUtils.singletonDictionary(Constants.SERVICE_PID, servicePid)); }
private <T> ServiceRegistration<T> registerManagedServiceFactory(BundleContext context, Class<T> serviceClass, T service, String servicePid) { return context.registerService(serviceClass, service, CollectionUtils.singletonDictionary(Constants.SERVICE_PID, servicePid)); }
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 } }
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 } }
@Override public HttpService addingService(ServiceReference<HttpService> reference) { HttpService httpService = context.getService(reference); Servlet servlet = new CXFNonSpringServlet(destinationRegistry, false); servletExporter = new ServletExporter(servlet, httpService); servletPublisherReg = context.registerService(ManagedService.class, servletExporter, CollectionUtils.singletonDictionary(Constants.SERVICE_PID, CXF_CONFIG_PID)); return httpService; } }
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 } }
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 } }