Examples of ServiceTracker


Examples of org.osgi.util.tracker.ServiceTracker

    } catch (Exception e) {

      System.err.println("icon load failed: " + e);
    }

    obrTracker = new ServiceTracker(bc,
                                    BundleRepositoryService.class.getName(),
                                    this);
    obrTracker.open();
  }
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

   
    inStream  = new SystemIn(bc);
    outStream = System.out;
    errStream = System.err;
   
    cmdProcTracker = new ServiceTracker(bc, CommandProcessor.class.getName(), this);
    cmdProcTracker.open();

    logTracker = new ServiceTracker(bc, LogService.class.getName(), null);
    logTracker.open();

  }
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

          zap(); // Create "empty" roles table
        }
        listeners = new Vector();

        eventAdminTracker
          = new ServiceTracker(Activator.bc, EventAdmin.class.getName(), null );
        eventQueue = new EventQueue(Activator.bc);
    }
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

  CommandProvidersService commandProviders;
  Bundle b;

  CommandProcessorImpl(Bundle b) {
    this.b = b;
    tioTracker = new ServiceTracker(Activator.bc,
                                    ThreadIO.class.getName(),
                                    null);
    tioTracker.open();

    commandProviders = new CommandProvidersService();     
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

        }

        reader = new InputStreamReader(new SystemIn(bc));
        writer = new PrintWriter(out);

        consoleTracker = new ServiceTracker(bc, consoleServiceName, this);
        consoleTracker.open();
    }
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

  public void start(BundleContext bc) {
    Activator.bc = bc;

    Activator.startLevelTracker
      = new ServiceTracker(bc, StartLevel.class.getName(), null);
    Activator.startLevelTracker.open();

    Activator.packageAdminTracker
      = new ServiceTracker(bc, PackageAdmin.class.getName(), null);
    Activator.packageAdminTracker.open();

    bc.addFrameworkListener(this);

    deployer = new DirDeployerImpl();
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

  public DirDeployerImpl() {

    // create and register the configuration class
    config = new Config();

    logTracker = new ServiceTracker(Activator.bc,
                                    LogService.class.getName(),
                                    null);
    logTracker.open();
  }
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

    String docurl = getBeanString(suite, "getDocURL", "");
    out.print("  <docurl>");
    out.print("<![CDATA[" + docurl + "]]>");
    out.println("</docurl>");

    ServiceTracker testListenerTracker = null;

    try {
      System.out.println("run test on " + suite);

      final TestResult tr = new TestResult();
      testListenerTracker = new ServiceTracker(Activator.bc,
                                               TestListener.class.getName(),
                                               null) {
          public Object addingService(ServiceReference reference)
          {
            TestListener tl = (TestListener) Activator.bc.getService(reference);
            tr.addListener(tl);
            return tl;
          }
          public void removedService(ServiceReference reference, Object service)
          {
            TestListener tl = (TestListener) service;
            tr.removeListener(tl);
          }
        };
      testListenerTracker.open();

      long start = System.currentTimeMillis();
      suite.run(tr);
      long stop  = System.currentTimeMillis();

      toXMLSuite(suite, tr, stop - start, out, 2);
      toXMLResult(tr, out);
      testListenerTracker.close();
    } finally {
      out.println(" </testcase>");
      if (null!=testListenerTracker){
        testListenerTracker.close();
      }
    }
  }
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

  }

  static StartLevel getStartLevelService()
  {
    if (null!=desktop) {
      final ServiceTracker slTracker = (ServiceTracker) desktop.slTracker;
      if (null!=slTracker) {
        return (StartLevel) slTracker.getService();
      }
    }
    return null;
  }
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

    Activator.bc        = _bc;
    Activator.log       = new LogRef(bc);
    Activator.myself    = this;

    remoteTracker = new ServiceTracker(bc, RemoteFramework.class.getName(), null) {
        public Object addingService(ServiceReference sr) {
          Object obj = super.addingService(sr);
          try desktop.setRemote(true); } catch (Exception e) { }
          return obj;
        }
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.