Examples of addBundleListener()


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

            this.store = new DefaltStartLevelStore();
        }

        store.start(framework);

        systemBundleContext.addBundleListener(this);

        this.serviceRegistration = systemBundleContext.registerService(StartLevelImpl.class.getName(), this, null);

        LOGGER.exiting(CLASS_NAME, "start");
    }
View Full Code Here

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

        this.savedFactory = framework.getBundleManager().getProtectionDomainFactory();
        framework.getBundleManager().setProtectionDomainFactory(this);

        BundleContext context = framework.getSystemBundleContext();

        context.addBundleListener(this);

        this.registration = context.registerService(ConditionalPermissionAdmin.class.getName(), this, null);
    }

    public void stop()
View Full Code Here

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

  }

  public void init() {
    BundleContext bundleContext = this.getBundleContext();
    bundleContext.addServiceListener(serviceListener);
    bundleContext.addBundleListener(bundleListener);
    init(0);
  }

  public void destory() {
    BundleContext bundleContext = this.getBundleContext();
View Full Code Here

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

        {
          return ctx.getBundle(0).getBundleContext();
        }
      });
      if (systemBundle == null) systemBundle = ctx;
      systemBundle.addBundleListener(cacheClearoutListener);
      systemBundle.addServiceListener(cacheClearoutListener);
    }
  }

  private static final class ServiceKey
View Full Code Here

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

    // TODO externalize
    logger.info("early startup"); //$NON-NLS-1$

    BundleContext context = Activator.getDefault().getBundle()
        .getBundleContext();
    context.addBundleListener(new BundleListener(context));
  }

}
View Full Code Here

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

                            }
                        }
                    }
                }
            };
            sysContext.addBundleListener(uninstallListener);

            // Create the list of {@link Deployment}s for the configured modules
            List<Deployment> deployments = new ArrayList<Deployment>();
            BundleDeploymentPlugin depPlugin = bundleManager.getPlugin(BundleDeploymentPlugin.class);
            for (OSGiModule module : injectedConfig.getValue().getModules()) {
View Full Code Here

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

      _webBundleDeployer = new WebBundleDeployer(_webExtenderServlet);

      _startedBundleListener = new StartedBundleListener(
        _webBundleDeployer);

      bundleContext.addBundleListener(_startedBundleListener);

      _stoppedBundleListener = new StoppedBundleListener(
        _webBundleDeployer);

      bundleContext.addBundleListener(_stoppedBundleListener);
View Full Code Here

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

      bundleContext.addBundleListener(_startedBundleListener);

      _stoppedBundleListener = new StoppedBundleListener(
        _webBundleDeployer);

      bundleContext.addBundleListener(_stoppedBundleListener);
    }
    catch (Exception e) {
      _log.error(e, e);
    }
View Full Code Here

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

      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");

    } catch (Exception ex) {
View Full Code Here

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

public class ServiceDecoratorImplTest extends TestCase {
    public void testServiceDecorator() {
        final BundleListener[] bundleListener = new BundleListener[1];
       
        BundleContext bc = EasyMock.createMock(BundleContext.class);
        bc.addBundleListener((BundleListener) EasyMock.anyObject());
        EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {           
            public Object answer() throws Throwable {
                bundleListener[0] = (BundleListener) EasyMock.getCurrentArguments()[0];
                return null;
            }
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.