public class ServiceRankingDelegationResultListener<S> extends TerminableIntermediateDelegationResultListener<S>
| Modifier and Type | Field and Description | 
|---|---|
| protected IRankingSearchTerminationDecider<S> | deciderThe termination decider. | 
| protected java.lang.Boolean | finishedThe listener state (false=unfinished, null=finishing, true=finished. | 
| protected IServiceRanker<S> | rankerThe ranker. | 
| protected java.util.List<S> | resultsThe saved results. | 
customIntermediateResultListener, customResultListener, delegate, future, undone| Constructor and Description | 
|---|
| ServiceRankingDelegationResultListener(TerminableIntermediateDelegationFuture<S> future,
                                      ITerminableIntermediateFuture<S> src,
                                      IServiceRanker<S> ranker,
                                      IRankingSearchTerminationDecider<S> decider)Create a new ranker. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | customIntermediateResultAvailable(S result)Process intermediate results for ranking. | 
| void | customResultAvailable(java.util.Collection<S> result)Called when result is available. | 
| void | exceptionOccurred(java.lang.Exception exception)Called when exception occurs. | 
| void | finished()Declare that the future is finished. | 
| boolean | isFinished()Get the finished. | 
| boolean | isFinishing()Get the finished. | 
| protected void | notifyException(java.lang.Exception exception) | 
| protected void | notifyResults(java.util.List<Tuple2<S,java.lang.Double>> results) | 
| protected void | rankResults()Rank the results and announce them | 
commandAvailable, exceptionOccurredIfUndone, finishedIfUndone, handleException, intermediateResultAvailable, intermediateResultAvailableIfUndone, resultAvailable, resultAvailableIfUndoneprotected java.util.List<S> results
protected java.lang.Boolean finished
protected IServiceRanker<S> ranker
protected IRankingSearchTerminationDecider<S> decider
public ServiceRankingDelegationResultListener(TerminableIntermediateDelegationFuture<S> future, ITerminableIntermediateFuture<S> src, IServiceRanker<S> ranker, IRankingSearchTerminationDecider<S> decider)
public void customIntermediateResultAvailable(S result)
customIntermediateResultAvailable in class IntermediateDelegationResultListener<S>result - The result.public void customResultAvailable(java.util.Collection<S> result)
customResultAvailable in class IntermediateDelegationResultListener<S>result - The result.public void exceptionOccurred(java.lang.Exception exception)
exceptionOccurred in interface IFunctionalExceptionListenerexceptionOccurred in class IntermediateDelegationResultListener<S>exception - The exception.public void finished()
IntermediateDelegationResultListenerfinished in interface IFunctionalIntermediateFinishedListenerfinished in interface IIntermediateResultListener<S>finished in class IntermediateDelegationResultListener<S>public boolean isFinished()
public boolean isFinishing()
protected void rankResults()
protected void notifyException(java.lang.Exception exception)