Search in sources :

Example 6 with IDiscoveryAdvertiser

use of org.eclipse.ecf.discovery.IDiscoveryAdvertiser in project ecf by eclipse.

the class DiscoveryContainerTest method getDiscoveryAdvertiser.

protected IDiscoveryAdvertiser getDiscoveryAdvertiser() {
    final IDiscoveryAdvertiser adapter = (IDiscoveryAdvertiser) container.getAdapter(IDiscoveryAdvertiser.class);
    assertNotNull("Adapter must not be null", adapter);
    return adapter;
}
Also used : IDiscoveryAdvertiser(org.eclipse.ecf.discovery.IDiscoveryAdvertiser)

Example 7 with IDiscoveryAdvertiser

use of org.eclipse.ecf.discovery.IDiscoveryAdvertiser in project ecf by eclipse.

the class DiscoveryTestsWithoutRegister method getDiscoveryAdvertiser.

protected IDiscoveryAdvertiser getDiscoveryAdvertiser() {
    final IDiscoveryAdvertiser adapter = (IDiscoveryAdvertiser) container.getAdapter(IDiscoveryAdvertiser.class);
    assertNotNull("Adapter must not be null", adapter);
    return adapter;
}
Also used : IDiscoveryAdvertiser(org.eclipse.ecf.discovery.IDiscoveryAdvertiser)

Example 8 with IDiscoveryAdvertiser

use of org.eclipse.ecf.discovery.IDiscoveryAdvertiser in project ecf by eclipse.

the class Activator method waitForDiscoveryService.

public IDiscoveryAdvertiser waitForDiscoveryService(int waittime) throws InterruptedException {
    if (discoveryTracker == null) {
        discoveryTracker = new ServiceTracker(context, IDiscoveryAdvertiser.class.getName(), null);
        discoveryTracker.open();
    }
    return (IDiscoveryAdvertiser) discoveryTracker.waitForService(waittime);
}
Also used : IDiscoveryAdvertiser(org.eclipse.ecf.discovery.IDiscoveryAdvertiser) ServiceTracker(org.osgi.util.tracker.ServiceTracker)

Aggregations

IDiscoveryAdvertiser (org.eclipse.ecf.discovery.IDiscoveryAdvertiser)8 ServiceTracker (org.osgi.util.tracker.ServiceTracker)3 ServiceReference (org.osgi.framework.ServiceReference)2 Dictionary (java.util.Dictionary)1 Hashtable (java.util.Hashtable)1 IDiscoveryLocator (org.eclipse.ecf.discovery.IDiscoveryLocator)1 ServiceEvent (org.osgi.framework.ServiceEvent)1 ServiceListener (org.osgi.framework.ServiceListener)1 Configuration (org.osgi.service.cm.Configuration)1 ConfigurationAdmin (org.osgi.service.cm.ConfigurationAdmin)1