Examples of FrameworkStartLevel


Examples of org.osgi.framework.startlevel.FrameworkStartLevel

        // State
        dstate.state = state;
        // Service bundle
        dstate.serviceBundle = bundle;
        // Start level
        FrameworkStartLevel fsl = systemBundleContext.getBundle().adapt(FrameworkStartLevel.class);
        dstate.initialBundleStartLevel = fsl.getInitialBundleStartLevel();
        dstate.currentStartLevel = fsl.getStartLevel();
        // Bundles
        dstate.bundles = new HashMap<>();
        for (Bundle bundle : systemBundleContext.getBundles()) {
            dstate.bundles.put(bundle.getBundleId(), bundle);
        }
View Full Code Here

Examples of org.osgi.framework.startlevel.FrameworkStartLevel

    @Override
    protected Object doExecute(java.util.List<Bundle> bundles) throws Exception {
        determineBundleLevelThreshold();
       
        // Display active start level.
        FrameworkStartLevel fsl = this.bundleContext.getBundle(0).adapt(FrameworkStartLevel.class);
        if (fsl != null) {
            System.out.println("START LEVEL " + fsl.getStartLevel() + " , List Threshold: " + bundleLevelThreshold);
        }

        ShellTable table = new ShellTable();
        table.column("ID").alignRight();
        table.column("State");
View Full Code Here

Examples of org.osgi.framework.startlevel.FrameworkStartLevel

        URI uri = createTempRepo(FEATURE_WITH_INVALID_BUNDLE, bundle1Uri, bundle2Uri);
       
        BundleContext bundleContext = EasyMock.createMock(BundleContext.class);
        Bundle bundle = EasyMock.createMock(Bundle.class);
        FrameworkStartLevel fsl = EasyMock.createMock(FrameworkStartLevel.class);
        expect(bundleContext.getBundles()).andReturn(new Bundle[0]);
        expect(bundleContext.getBundle()).andReturn(bundle);
        expect(bundle.adapt(FrameworkStartLevel.class)).andReturn(fsl);
        expect(fsl.getInitialBundleStartLevel()).andReturn(50);
        expect(fsl.getStartLevel()).andReturn(100);
        replay(bundleContext, bundle, fsl);

        FeaturesServiceImpl svc = new FeaturesServiceImpl(null, bundleContext, new Storage(), null, null, null, null, null, null, null, null, null);
        svc.addRepository(uri);
        try {
View Full Code Here

Examples of org.osgi.framework.startlevel.FrameworkStartLevel

                LOG.debug("+ Install (no start) {}", bundle);
            }
        }
        // All bundles are installed, we can now start the framework...
        framework.start();
        FrameworkStartLevel fsl = framework.adapt(FrameworkStartLevel.class);
        setFrameworkStartLevel(context, fsl);
        verifyThatBundlesAreResolved(bundles);
    }
View Full Code Here

Examples of org.osgi.framework.startlevel.FrameworkStartLevel

        framework.init();
        framework.getBundleContext().addFrameworkListener(lockCallback);
        framework.start();

        FrameworkStartLevel sl = framework.adapt(FrameworkStartLevel.class);
        sl.setInitialBundleStartLevel(config.defaultBundleStartlevel);

        // If we have a clean state, install everything
        if (framework.getBundleContext().getBundles().length == 1) {

            LOG.info("Installing and starting initial bundles");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.