Package org.osgi.framework

Examples of org.osgi.framework.SynchronousBundleListener


        };
        return tracker;
    }

    private SynchronousBundleListener createBundleInstallListener() {
        return new SynchronousBundleListener() {
            @Override
            public void bundleChanged(BundleEvent event) {
                int eventType = event.getType();
                Bundle bundle = event.getBundle();
                if (eventType == BundleEvent.RESOLVED) {
View Full Code Here


  /**
   * @return
   */
  private BundleListener getBundleListener() {
    if (bundleListener == null) {
      bundleListener = new SynchronousBundleListener() {
        public void bundleChanged(BundleEvent event) {
          WorkbenchPlugin.this.bundleChanged(event);
        }
      };
    }
View Full Code Here

        };
        return tracker;
    }

    private SynchronousBundleListener createBundleInstallListener() {
        return new SynchronousBundleListener() {
            @Override
            public void bundleChanged(BundleEvent event) {
                int eventType = event.getType();
                Bundle bundle = event.getBundle();
                if (eventType == BundleEvent.RESOLVED) {
View Full Code Here

    public FrameworkEvent waitForStop(long timeout)
        throws InterruptedException {
      final Object lock = new Object();
     
      m_bundle.getBundleContext().addBundleListener(new SynchronousBundleListener() {
       
        public void bundleChanged(BundleEvent event) {
          if ((event.getBundle() == m_bundle) && (event.getType() == BundleEvent.STOPPED)) {
            synchronized (lock) {
              lock.notifyAll();
View Full Code Here

       * will fail with an NPE.
       */
     
      final AtomicBoolean loadedClass = new AtomicBoolean(false);
     
      context().addBundleListener(new SynchronousBundleListener() {
        public void bundleChanged(BundleEvent event) {
            Bundle b = event.getBundle();
            if (event.getType() == BundleEvent.STARTING || event.getType() == BundleEvent.LAZY_ACTIVATION) {
                if (b.getEntry("org/apache/aries/isolated/sample/SharedImpl.class") != null) {
                    try {
View Full Code Here

  static BundleContext getContext() {
    return context;
  }

  public Activator() {
    bundleListener = new SynchronousBundleListener() {

      public void bundleChanged(BundleEvent event) {
        Bundle startingBundle = event.getBundle();
        int bundleEventType = event.getType();
        if (BundleEvent.STARTING == bundleEventType) {
View Full Code Here

        getBundleName()));
    if (tmpStr != null && !tmpStr.equals("")) {
      this.setViewNameSuffix(tmpStr);
    }
    final ViewRenderService thisService = this;
    bundleListener = new SynchronousBundleListener() {

      public void bundleChanged(BundleEvent event) {
        thisService.bundleChanged(event);
      }
    };
View Full Code Here

          }
        }
        serviceChangedWarper(event);
      }
    };
    bundleListener = new SynchronousBundleListener() {

      public void bundleChanged(BundleEvent event) {
        bundleChangedWarper(event);
      }
    };
View Full Code Here

      // cannot report progress (e.g. if the splash screen is not showing)
      // fall back to starting without showing progress.
      runnable.run();
    } else {
      progressMonitor.beginTask("", expectedProgressCount); //$NON-NLS-1$
      SynchronousBundleListener bundleListener = new StartupProgressBundleListener(
          progressMonitor, (int) (expectedProgressCount * cutoff));
      WorkbenchPlugin.getDefault().addBundleListener(bundleListener);
      try {
        runnable.run();
        progressMonitor.subTask(WorkbenchMessages.Startup_Done);
View Full Code Here

            installModule(wiring.getClassLoader(), resource, null, null);
        } catch (ModuleException ex) {
            throw new IllegalStateException("Cannot install system module", ex);
        }

        installListener = new SynchronousBundleListener() {
            @Override
            public void bundleChanged(BundleEvent event) {
                int eventType = event.getType();
                Bundle bundle = event.getBundle();
                if (eventType == BundleEvent.RESOLVED) {
View Full Code Here

TOP

Related Classes of org.osgi.framework.SynchronousBundleListener

Copyright © 2018 www.massapicom. 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.