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); }
if(!checkFinished(selector, endret) && provider!=null && decider.searchNode(start==null? null: start.getId(), source==null? null: source.getId(), provider.getId(), endret.getIntermediateResults())) addOpenCall(endret, fut); fut.addResultListener(new IResultListener<Collection<IService>>() checkAndSetResults(ret, finished, 1); checkAndSetResults(ret, finished, 2);
public void resultAvailable(IServiceProvider target) { // IServiceProvider target = (IServiceProvider)result; // Do not go back to where we came from. if(!SUtil.equals(source, target)) { // SEARCH.set(search); processNode(start, provider, target, decider, selector, services, up, endret) .addResultListener(new IResultListener<Void>() { public void resultAvailable(Void result) { checkAndSetResults(ret, finished, 1); } public void exceptionOccurred(Exception exception) { checkAndSetResults(ret, finished, 1); } }); // SEARCH.set(null); } else { checkAndSetResults(ret, finished, 1); } }
public void exceptionOccurred(Exception exception) { checkAndSetResults(ret, finished, 1); } });
processNode(provider, null, provider, decider, selector, services, up, ret) .addResultListener(new IResultListener<Void>()
processNode(start, provider, target, decider, selector, services, false, endret) .addResultListener(crl); checkAndSetResults(ret, finished, 2);
public void exceptionOccurred(Exception exception) { checkAndSetResults(ret, finished, 2); } });