Examples of addFrameworkListener()


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

      BundleContext felixBudleContext = felix.getBundleContext();

      AutoProcessor.process(otherProps, felixBudleContext);
      // listen to errors
      felixBudleContext.addFrameworkListener(frameworkErrorListener);
      felixBudleContext.addBundleListener(myBundleListener);
      // Now start Felix instance.
      felix.start();
      System.out.println("felix started");
View Full Code Here

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

    // So we need to cope with multiple equinox frameworks, so we can't just listen to our
    // BundleContext. Instead we add a listener to Bundle 0 of the framework bundle associated
    // with the bundle passed in.
    BundleContext ctx = b.getBundleContext().getBundle(0).getBundleContext();
    ctx.addBundleListener(this);
    ctx.addFrameworkListener(this);
  }

  private synchronized ClassLoader put(Bundle b, ClassLoader cl)
  {
    // If the bundle is uninstalled or installed then there is no classloader so we should
View Full Code Here

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

                LOG.info("Update of {} bundle will cause the following bundles to be refreshed: {}", bundleName, bundleListString);
            }
           
            // install listener for package refresh
            refreshListener = new RefreshListener();
            context.addFrameworkListener(refreshListener);

            // refresh the bundle - this happens asynchronously
            packageAdmin.refreshPackages(bundles);

            // update application archive
View Full Code Here

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

    // So we need to cope with multiple equinox frameworks, so we can't just listen to our
    // BundleContext. Instead we add a listener to Bundle 0 of the framework bundle associated
    // with the bundle passed in.
    BundleContext ctx = b.getBundleContext().getBundle(0).getBundleContext();
    ctx.addBundleListener(this);
    ctx.addFrameworkListener(this);
  }

  private synchronized ClassLoader put(Bundle b, ClassLoader cl)
  {
    // If the bundle is uninstalled or installed then there is no classloader so we should
View Full Code Here

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

    }

    public void testStartDoesNotFailWithOneInvalidUri()  {
        BundleContext bundleContext = EasyMock.createMock(BundleContext.class);
        expect(bundleContext.getDataFile(EasyMock.<String>anyObject())).andReturn(dataFile).anyTimes();
        bundleContext.addFrameworkListener(EasyMock.<FrameworkListener>anyObject());
        bundleContext.removeFrameworkListener(EasyMock.<FrameworkListener>anyObject());
        replay(bundleContext);
        FeaturesServiceImpl service = new FeaturesServiceImpl();
        service.setBundleContext(bundleContext);
        try {
View Full Code Here

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

    }

    public void testStartDoesNotFailWithOneInvalidUri()  {
        BundleContext bundleContext = EasyMock.createMock(BundleContext.class);
        expect(bundleContext.getDataFile(EasyMock.<String>anyObject())).andReturn(dataFile).anyTimes();
        bundleContext.addFrameworkListener(EasyMock.<FrameworkListener>anyObject());
        bundleContext.removeFrameworkListener(EasyMock.<FrameworkListener>anyObject());
        replay(bundleContext);
        FeaturesServiceImpl service = new FeaturesServiceImpl();
        service.setBundleContext(bundleContext);
        try {
View Full Code Here

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

    }

    public void testStartDoesNotFailWithOneInvalidUri()  {
        BundleContext bundleContext = EasyMock.createMock(BundleContext.class);
        expect(bundleContext.getDataFile(EasyMock.<String>anyObject())).andReturn(dataFile).anyTimes();
        bundleContext.addFrameworkListener(EasyMock.<FrameworkListener>anyObject());
        bundleContext.removeFrameworkListener(EasyMock.<FrameworkListener>anyObject());
        replay(bundleContext);
        FeaturesServiceImpl service = new FeaturesServiceImpl();
        service.setBundleContext(bundleContext);
        try {
View Full Code Here

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

    }

    public void testStartDoesNotFailWithOneInvalidUri()  {
        BundleContext bundleContext = EasyMock.createMock(BundleContext.class);
        expect(bundleContext.getDataFile(EasyMock.<String>anyObject())).andReturn(dataFile).anyTimes();
        bundleContext.addFrameworkListener(EasyMock.<FrameworkListener>anyObject());
        bundleContext.removeFrameworkListener(EasyMock.<FrameworkListener>anyObject());
        replay(bundleContext);
        FeaturesServiceImpl service = new FeaturesServiceImpl();
        service.setBundleContext(bundleContext);
        try {
View Full Code Here

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

    }

    public void testStartDoesNotFailWithOneInvalidUri()  {
        BundleContext bundleContext = EasyMock.createMock(BundleContext.class);
        expect(bundleContext.getDataFile(EasyMock.<String>anyObject())).andReturn(dataFile).anyTimes();
        bundleContext.addFrameworkListener(EasyMock.<FrameworkListener>anyObject());
        bundleContext.removeFrameworkListener(EasyMock.<FrameworkListener>anyObject());
        replay(bundleContext);
        FeaturesServiceImpl service = new FeaturesServiceImpl();
        service.setBundleContext(bundleContext);
        try {
View Full Code Here

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

    }

    public void testStartDoesNotFailWithOneInvalidUri()  {
        BundleContext bundleContext = EasyMock.createMock(BundleContext.class);
        expect(bundleContext.getDataFile(EasyMock.<String>anyObject())).andReturn(dataFile).anyTimes();
        bundleContext.addFrameworkListener(EasyMock.<FrameworkListener>anyObject());
        bundleContext.removeFrameworkListener(EasyMock.<FrameworkListener>anyObject());
        replay(bundleContext);
        FeaturesServiceImpl service = new FeaturesServiceImpl();
        service.setBundleContext(bundleContext);
        try {
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.