Package org.osgi.framework

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


                }
                try {
                    if (isFrameworkExtensionBundle(bundle)) {
                        setSystemBundleUpdationRequired(true);
                    }
                    bundle.update();
                    noOfUpdatedBundles++;
                    logger.log(Level.INFO, LogFacade.BUNDLE_UPDATED, new Object[]{bundle.getBundleId(), jar.getPath()});
                } catch (Exception e) {
                    LogFacade.log(logger,
                            Level.WARNING,
View Full Code Here


     * @see org.osgi.jmx.framework.FrameworkMBean#restartFramework()
     */
    public void restartFramework() throws IOException {
        Bundle bundle = FrameworkUtils.resolveBundle(context, 0);
        try {
            bundle.update();
        } catch (Exception be) {
            IOException ioex = new IOException("Framework restart failed with message: " + be.getMessage());
            ioex.initCause(be);
            throw ioex;
        }
View Full Code Here

     * @see org.osgi.jmx.framework.FrameworkMBean#updateBundle(long)
     */
    public void updateBundle(long bundleIdentifier) throws IOException {
        Bundle bundle = FrameworkUtils.resolveBundle(context, bundleIdentifier);
        try {
            bundle.update();
        } catch (Exception be) {
            IOException ioex = new IOException("Update of bundle with id " + bundleIdentifier + " failed with message: " + be.getMessage());
            ioex.initCause(be);
            throw ioex;
        }
View Full Code Here

    public void updateBundleFromURL(long bundleIdentifier, String url) throws IOException {
        Bundle bundle = FrameworkUtils.resolveBundle(context, bundleIdentifier);
        InputStream inputStream = null;
        try {
            inputStream = createStream(url);
            bundle.update(inputStream);
        } catch (Exception be) {
            IOException ioex = new IOException("Update of bundle with id " + bundleIdentifier + " from url " + url + " failed with message: " + be.getMessage());
            ioex.initCause(be);
            throw ioex;
        } finally {
View Full Code Here

     * @see org.osgi.jmx.framework.FrameworkMBean#updateFramework()
     */
    public void updateFramework() throws IOException {
        Bundle bundle = FrameworkUtils.resolveBundle(context, 0);
        try {
            bundle.update();
        } catch (Exception be) {
            IOException ioex = new IOException("Update of framework bundle failed with message: " + be.getMessage());
            ioex.initCause(be);
            throw ioex;
        }
View Full Code Here

                }
                try {
                    if (isFrameworkExtensionBundle(bundle)) {
                        systemBundleUpdationRequired = true;
                    }
                    bundle.update();
                    noOfUpdatedBundles++;
                    logger.logp(Level.INFO, "BundleProvisioner", "update",
                            "Updated bundle {0} from {1} ",
                            new Object[]{bundle.getBundleId(), jar.getPath()});
                } catch (Exception e) {
View Full Code Here

                }
                try {
                    if (isFrameworkExtensionBundle(bundle)) {
                        setSystemBundleUpdationRequired(true);
                    }
                    bundle.update();
                    noOfUpdatedBundles++;
                    logger.log(Level.INFO, LogFacade.BUNDLE_UPDATED, new Object[]{bundle.getBundleId(), jar.getPath()});
                } catch (Exception e) {
                    LogFacade.log(logger,
                            Level.WARNING,
View Full Code Here

  public void start(BundleContext context) throws Exception {
    Bundle[] bundles = context.getBundles();
    for (int i = 0; i < bundles.length; i++) {
      Bundle b = bundles[i];
      if (b.getLocation().startsWith("eclipse-project:")) {
        b.update();
      }
    }
  }

  public void stop(BundleContext arg0) throws Exception {
View Full Code Here

     * @see org.osgi.jmx.framework.FrameworkMBean#restartFramework()
     */
    public void restartFramework() throws IOException {
        Bundle bundle = FrameworkUtils.resolveBundle(context, 0);
        try {
            bundle.update();
        } catch (Exception be) {
            IOException ioex = new IOException("Framework restart failed with message: " + be.getMessage());
            ioex.initCause(be);
            throw ioex;
        }
View Full Code Here

     * @see org.osgi.jmx.framework.FrameworkMBean#updateBundle(long)
     */
    public void updateBundle(long bundleIdentifier) throws IOException {
        Bundle bundle = FrameworkUtils.resolveBundle(context, bundleIdentifier);
        try {
            bundle.update();
        } catch (Exception be) {
            IOException ioex = new IOException("Update of bundle with id " + bundleIdentifier + " failed with message: " + be.getMessage());
            ioex.initCause(be);
            throw ioex;
        }
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.