Examples of ServiceTracker


Examples of com.dotcms.repackage.org.osgi.util.tracker.ServiceTracker

        //Initializing services...
        initializeServices( context );

        //Create new ServiceTracker for HelloWorldService via HelloWorld interface
        helloWorldServiceTracker = new ServiceTracker( context, HelloWorld.class.getName(), null );

        //Service reference to ExtHttpService that will allows to register servlets and filters
        ServiceReference sRef = context.getServiceReference( ExtHttpService.class.getName() );
        if ( sRef != null ) {
View Full Code Here

Examples of org.apache.felix.dm.tracker.ServiceTracker

@RunWith(PaxExam.class)
public class ServiceTrackerTest extends TestBase {
    @Test
    public void testPlainServiceTracker() {
        ServiceTracker st = new ServiceTracker(context, ServiceInterface.class.getName(), null);
        st.open();
        ServiceRegistration sr = context.registerService(ServiceInterface.class.getName(), new ServiceProvider(), null);
        Assert.assertEquals("There should be one service that matches the tracker", 1, st.getServices().length);
        sr.unregister();
        Assert.assertNull("There should be no service that matches the tracker", st.getServices());
        st.close();
    }
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

  }

  private void init() throws IOException {
    plugin = this;
    _resourceBundle = ResourceBundle.getBundle("de.innovationgate.eclipse.editors.resources");   
    _proxyServiceTracker = new ServiceTracker(getBundle().getBundleContext(), IProxyService.class.getName(), null);
    _proxyServiceTracker.open();
    setDebugging(Boolean.parseBoolean(System.getProperty(SYSPROP_DEBUG, "false")));

    try {
      File resourceManager = new File(getStateLocation().toFile(), "resourceManager");
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

    context.addBundleListener(this);
  }

  private void init() {
    try {
      _proxyServiceTracker = new ServiceTracker(getBundle().getBundleContext(), IProxyService.class.getName(), null);
      _proxyServiceTracker.open();

      setDebugging(Boolean.parseBoolean(System.getProperty(SYSPROP_DEBUG, "false")));
     
      // init resource manager
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

  public void start(BundleContext context) throws Exception {
    this.context = context;

    context.registerService(this.getClass().getName(), this, null);

    tracker = new ServiceTracker(context, FooService.class.getName(), this);
    tracker.open();
  }
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

  public void start(BundleContext context) throws Exception {
    this.context = context;

    context.registerService(this.getClass().getName(), this, null);

    tracker = new ServiceTracker(context, FooService.class.getName(), this);
    tracker.open();
  }
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

    InputStream in = null;

    if(xml_parser == null){
      xml_parser = new KXmlParser();

      confAdminTracker = new ServiceTracker(bc, ConfigurationAdmin.class.getName(), null);
      confAdminTracker.open();
    }

    currentBMTR = new BundleMetaTypeResource(b);
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

  /**
   * Initialize log and start SCR.
   */
  public void start(BundleContext bc) throws Exception {
    Activator.bc = bc;
    logTracker = new ServiceTracker(bc, LogService.class.getName(), null);
    logTracker.open();
    scr = new SCR(bc);
    scr.start();
  }
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

  public ConsoleSwing(BundleContext bc)  {
    this.bc              = bc;
    this.theConsoleSwing = this;
    // Set up service tracker for the console service.
    consoleTracker = new ServiceTracker(bc, consoleServiceName, this);
  }
View Full Code Here

Examples of org.osgi.util.tracker.ServiceTracker

  ServiceUserThread thread;

  public void start(BundleContext bc) throws Exception {
    Activator.bc = bc;
    log("starting");
    tracker =  new ServiceTracker(bc,
                                  DateService.class.getName(),
                                  customizer);
    tracker.open();
  }
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.