public void resultAvailable(T result) { // If already had exception do nothing. // Cannot cause race conditions as the checker is called only if all tasks have been done. if(future.isDone()) return; // if(!binding.isDynamic()) DefaultServiceFetcher.this.result = future.getIntermediateResults(); // no service not found exception for multiple search! // if(future.getIntermediateResults().size()==0) // { // StoreIntermediateDelegationResultListener.this.exceptionOccurred(new ServiceNotFoundException("no results")); // } // else // { StoreIntermediateDelegationResultListener.super.finished(); // } } });
suspend = !ret && !isDone(); if(suspend)
public void resultAvailable(T result) { // If already had exception do nothing. // Cannot cause race conditions as the checker is called only if all tasks have been done. if(future.isDone()) return; // if(!binding.isDynamic()) DefaultServiceFetcher.this.result = future.getIntermediateResults(); if(future.getIntermediateResults().size()==0) { StoreIntermediateDelegationResultListener.this.exceptionOccurred(new ServiceNotFoundException("no results")); } else { StoreIntermediateDelegationResultListener.super.finished(); } } });