public void exceptionOccurred(Exception exception) { removeOpenCall(endret, fut); checkAndSetResults(ret, finished, 0); } });
public void resultAvailable(Collection<IService> result) { removeOpenCall(endret, fut); if(result!=null) { for(Iterator<IService> it=((Collection<IService>)result).iterator(); it.hasNext(); ) { IService next = it.next(); // Must recheck if already finished (otherwise duplicate results may occur). if(!endret.getIntermediateResults().contains(next) // && !selector.isFinished(endret.getIntermediateResults())) && !checkFinished(selector, endret)) { // System.out.println("found: "+next); endret.addIntermediateResult(next); } } } checkAndSetResults(ret, finished, 0); }