Package org.osgi.framework

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


                            "A bundle with the same symbolic name ("
                            + sn + ") and version (" + vStr
                            + ") is already installed.  Updating this bundle instead.", null);
                        stopTransient(b);
                        Util.storeChecksum(b, checksum, context);
                        b.update(is);
                    }
                    return b;
                }
            }
        }
View Full Code Here


                InputStream in = (transformed != null)
                    ? transformed.openStream()
                    : new FileInputStream(path);
                try
                {
                    bundle.update(in);
                }
                finally
                {
                    in.close();
                }
View Full Code Here

                stopTransient(bundle);
                Util.storeChecksum(bundle, artifact.getChecksum(), context);
                InputStream in = new FileInputStream(transformed != null ? transformed : path);
                try
                {
                    bundle.update(in);
                }
                finally
                {
                    in.close();
                }
View Full Code Here

            if (framework != null) {
                framework.update();
            } else {
                Bundle bundle = visitor.getBundle(0);
                if (bundle != null) {
                    bundle.update();
                }
            }
        } catch (Exception e) {
            logVisitor.warning("restartFramework error", e);
            throw new IOException(e.getMessage());
View Full Code Here

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

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

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

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

                    try {
                        Bundle bundle = visitor.getBundle(bundleId);
                        if (bundle == null) {
                            throw new IllegalArgumentException("Bundle ID is wrong: " + bundleId);
                        }
                        bundle.update(new URL(urls[i]).openStream());
                        completedBundles.add(bundleId);
                    } catch (Exception e) {
                        logVisitor.warning("Bundle update from URL error", e);
                        isSuccess = false;
                        errorBundleId = bundleId;
View Full Code Here

    public void updateFramework() throws IOException {
        try {
            Bundle bundle = visitor.getBundle(0);
            if (bundle != null) {
                bundle.update();
            }
        } catch (Exception e) {
            logVisitor.warning("updateFramework error", e);
            throw new IOException(e.getMessage());
        }
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.