use of org.eclipse.ecf.discovery.IServiceInfo in project ecf by eclipse.
the class ZooDiscoveryContainer method getServices.
public IServiceInfo[] getServices(IServiceTypeID type) {
Assert.isNotNull(type);
if (watchManager == null) {
return new IServiceInfo[0];
}
List<IServiceInfo> services = new ArrayList<IServiceInfo>();
for (IServiceInfo sinfo : watchManager.getAllKnownServices().values()) {
if (sinfo.getServiceID().getServiceTypeID().getInternal() == type.getInternal())
services.add(sinfo);
}
return services.toArray(new IServiceInfo[services.size()]);
}
use of org.eclipse.ecf.discovery.IServiceInfo in project ecf by eclipse.
the class WatchManager method unpublish.
public synchronized void unpublish(final String id) {
Assert.isNotNull(id);
IServiceInfo p = AdvertisedService.removePublished(id);
if (p == null) {
return;
}
NodeWriter nw = getNodeWriters().remove(id);
if (nw != null) {
allKnownServices.remove(nw.getNode().getWrappedService().getServiceID().getName());
nw.remove();
}
nw = null;
}
Aggregations