Package org.osgi.framework

Examples of org.osgi.framework.Bundle.uninstall()


            bundles.removeAll(b);
        }
        for (long bundleId : bundles) {
            Bundle b = getBundleContext().getBundle(bundleId);
            if (b != null) {
                b.uninstall();
            }
        }
        refreshPackages(null);
        callListeners(new FeatureEvent(feature, FeatureEvent.EventType.FeatureUninstalled, false));
        saveState();
View Full Code Here


            Bundle bundle = visitor.getBundle(bundleIdentifier);
            if (bundle == null) {
                throw new IllegalArgumentException("Bundle ID is wrong: " + bundleIdentifier);
            }
            try {
                bundle.uninstall();
            } catch (Exception e) {
                throw new IOException("Unable to uninstall bundle: " + bundleIdentifier);
            }
        } catch (IllegalArgumentException e) {
            logVisitor.warning("uninstallBundle error", e);
View Full Code Here

                try {
                    Bundle bundle = visitor.getBundle(bundleId);
                    if (bundle == null) {
                        throw new IllegalArgumentException("Bundle ID is wrong: " + bundleId);
                    }
                    bundle.uninstall();
                    completedBundles.add(bundleId);
                } catch (BundleException e) {
                    logVisitor.warning("Bundle uninstall error", e);
                    isSuccess = false;
                    errorBundleId = bundleId;
View Full Code Here

                Bundle bundle = installedBundles.get(i);
                try {
                    if (logger.isLoggable(Level.FINE)) {
                        logger.fine("Uninstalling bundle: " + string(bundle, false));
                    }
                    bundle.uninstall();
                } catch (Exception e) {
                    logger.log(Level.SEVERE, e.getMessage(), e);
                }
            }
            installedBundles.clear();
View Full Code Here

    if (bundle == null)
      throw new IllegalStateException("Missing region context bundle: " + symbolicName);
    ThreadLocalSubsystem.set(subsystem);
    BundleRevision revision = bundle.adapt(BundleRevision.class);
    try {
      bundle.uninstall();
    }
    catch (BundleException e) {
      // TODO Should we really eat this? At least log it?
    }
    ResourceUninstaller.newInstance(revision, subsystem).uninstall();
View Full Code Here

      public void ended(Coordination coordination) throws Exception {
        // Nothing
      }

      public void failed(Coordination coordination) throws Exception {
        bundle.uninstall();
      }
    });
    // Set the start level of all bundles managed (i.e. installed) by the
    // subsystems implementation to 1 in case the framework's default bundle
    // start level has been changed. Otherwise, start failures will occur
View Full Code Here

            bundles.removeAll(b);
        }
        for (long bundleId : bundles) {
            Bundle b = getBundleContext().getBundle(bundleId);
            if (b != null) {
                b.uninstall();
            }
        }
        refreshPackages(null);
        callListeners(new FeatureEvent(feature, FeatureEvent.EventType.FeatureUninstalled, false));
        saveState();
View Full Code Here

    public void uninstallById(Set<Long> bundles, boolean refresh) throws BundleException,
            InterruptedException {
        for (long bundleId : bundles) {
            Bundle b = bundleContext.getBundle(bundleId);
            if (b != null) {
                b.uninstall();
            }
        }
        if (refresh) {
            refreshPackages(null);
        }
View Full Code Here

                Bundle bundle = installedBundles.get(i);
                try {
                    if (logger.isLoggable(Level.FINE)) {
                        logger.fine("Uninstalling bundle: " + string(bundle, false));
                    }
                    bundle.uninstall();
                } catch (Exception e) {
                    logger.log(Level.SEVERE, e.getMessage(), e);
                }
            }
            installedBundles.clear();
View Full Code Here

        expect(installedBundle.getHeaders()).andReturn(new Hashtable());
        installedBundle.start();

        // UnInstalls f1 and 0.1
        expect(bundleContext.getBundle(12345)).andReturn(installedBundle);
        installedBundle.uninstall();

        // UnInstalls f1 and 0.2
        expect(bundleContext.getBundle(123456)).andReturn(installedBundle);
        installedBundle.uninstall();
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.