Examples of installBundle()


Examples of org.osgi.framework.BundleContext.installBundle()

        File testBundle = new File("./target/bundle.jar");
        String location = testBundle.toURI().normalize().toString();

        BundleContext context = papoose.getSystemBundleContext();

        Bundle bundle = context.installBundle(location);

        Assert.assertEquals(1, bundle.getBundleId());

        Assert.assertEquals(location, bundle.getLocation());
View Full Code Here

Examples of org.osgi.framework.BundleContext.installBundle()

        File testBundle = new File("./target/bundle.jar");
        String location = testBundle.toURI().normalize().toString();

        BundleContext context = papoose.getSystemBundleContext();

        Bundle bundle = context.installBundle(location);

        Assert.assertEquals(1, bundle.getBundleId());

        Assert.assertEquals(location, bundle.getLocation());
View Full Code Here

Examples of org.osgi.framework.BundleContext.installBundle()

      fwk = getFrameworkFactory().newFramework(m);
      fwk.start();
      // Install bundle JAR files and remember the bundle objects.
      BundleContext ctxt = fwk.getBundleContext();
      for (int i = 0; i < jars.size(); i++) {
        Bundle b = ctxt.installBundle(((File) jars.get(i)).toURI().toString());
        bundleList.add(b);
      }
      // Start all installed bundles.
      for (int i = 0; i < bundleList.size(); i++) {
        ((Bundle) bundleList.get(i)).start();
View Full Code Here

Examples of org.osgi.framework.BundleContext.installBundle()

          return;
        }
        FileItem pluginFile = formFileMap.get("pluginFile");

        try {
          Bundle bundle = bundleContext.installBundle(
              pluginFile.getName(), pluginFile.getInputStream());
          bundle.start();

        } catch (Exception e) {
          e.printStackTrace();
View Full Code Here

Examples of org.osgi.framework.BundleContext.installBundle()

    public static void setUpBeforeClass() throws Exception {
        host = new TestEquinoxHost();
        BundleContext context = host.start();

        InputStream is = EquinoxServiceDiscovererTestCase.class.getResourceAsStream("/test-bundle-v1.jar");
        testBundle1 = context.installBundle("test-bundle-v1", is);
        is.close();
       
        is = EquinoxServiceDiscovererTestCase.class.getResourceAsStream("/test-bundle-v2.jar");
        testBundle2 = context.installBundle("test-bundle-v2", is);
        is.close();
View Full Code Here

Examples of org.osgi.framework.BundleContext.installBundle()

        InputStream is = EquinoxServiceDiscovererTestCase.class.getResourceAsStream("/test-bundle-v1.jar");
        testBundle1 = context.installBundle("test-bundle-v1", is);
        is.close();
       
        is = EquinoxServiceDiscovererTestCase.class.getResourceAsStream("/test-bundle-v2.jar");
        testBundle2 = context.installBundle("test-bundle-v2", is);
        is.close();

        discoverer = new EquinoxServiceDiscoverer(context);
    }
View Full Code Here

Examples of org.osgi.framework.BundleContext.installBundle()

    public static void setUpBeforeClass() throws Exception {
        host = new TestEquinoxHost();
        BundleContext context = host.start();

        InputStream is = EquinoxServiceDiscovererTestCase.class.getResourceAsStream("/test-bundle.jar");
        testBundle = context.installBundle("test-bundle", is);
        is.close();
        discoverer = new EquinoxServiceDiscoverer(context);
        File dep = new File("target/bundles");
        List<Bundle> bundles = new ArrayList<Bundle>();
        if(dep.isDirectory()) {
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.