Package org.apache.karaf.bundle.core.internal

Examples of org.apache.karaf.bundle.core.internal.BundleServiceImpl


    @SuppressWarnings("unchecked")
    public ListServicesTest() {
        listServices = new ListBundleServices();
        BundleContext bundleContext = new TestBundleFactory().createBundleContext();
        listServices.setBundleContext(bundleContext);
        listServices.setBundleService(new BundleServiceImpl(bundleContext, Collections.EMPTY_LIST));
    }
View Full Code Here


    public ListServicesTest() {
        listServices = new Services();
        bundleContext = new TestBundleFactory().createBundleContext();
        listServices.context = null;
        listServices.setBundleContext(bundleContext);
        listServices.setBundleService(new BundleServiceImpl(bundleContext));
    }
View Full Code Here

        ConfigurationAdmin configurationAdmin = getTrackedService(ConfigurationAdmin.class);
        if (configurationAdmin == null) {
            return;
        }

        final BundleServiceImpl bundleService = new BundleServiceImpl(bundleContext);
        register(BundleService.class, bundleService);
        bundleStateServicesTracker = new ServiceTracker<BundleStateService, BundleStateService>(
                bundleContext, BundleStateService.class, new ServiceTrackerCustomizer<BundleStateService, BundleStateService>() {
            @Override
            public BundleStateService addingService(ServiceReference<BundleStateService> reference) {
                BundleStateService service = bundleContext.getService(reference);
                bundleService.registerBundleStateService(service);
                return service;
            }
            @Override
            public void modifiedService(ServiceReference<BundleStateService> reference, BundleStateService service) {
            }
            @Override
            public void removedService(ServiceReference<BundleStateService> reference, BundleStateService service) {
                bundleService.unregisterBundleStateService(service);
                bundleContext.ungetService(reference);
            }
        }
        );
        bundleStateServicesTracker.open();
View Full Code Here

TOP

Related Classes of org.apache.karaf.bundle.core.internal.BundleServiceImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.