public void terminated(Exception reason) { removeQuery(query); } });
/** * Remove all service queries of a specific component from the registry. * @param owner The query owner. */ public void removeQueries(IComponentIdentifier owner) { if(queries!=null) { for(Map.Entry<ClassInfo, Set<ServiceQueryInfo<?>>> entry: new HashSet<Map.Entry<ClassInfo, Set<ServiceQueryInfo<?>>>>(queries.entrySet())) { for(ServiceQueryInfo<?> query: entry.getValue().toArray(new ServiceQueryInfo<?>[entry.getValue().size()])) { if(owner.equals(query.getQuery().getOwner())) { removeQuery(query.getQuery()); // entry.getValue().remove(query); } } } } }