public class ServiceRankingDelegationResultListener<S>
extends jadex.commons.future.TerminableIntermediateDelegationResultListener<S>
Modifier and Type | Field and Description |
---|---|
protected IRankingSearchTerminationDecider<S> |
decider
The termination decider.
|
protected java.lang.Boolean |
finished
The listener state (false=unfinished, null=finishing, true=finished.
|
protected IServiceRanker<S> |
ranker
The ranker.
|
protected java.util.List<S> |
results
The saved results.
|
Constructor and Description |
---|
ServiceRankingDelegationResultListener(jadex.commons.future.TerminableIntermediateDelegationFuture<S> future,
jadex.commons.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() |
boolean |
isFinished()
Get the finished.
|
boolean |
isFinishing()
Get the finished.
|
protected void |
notifyException(java.lang.Exception exception) |
protected void |
notifyResults(java.util.List<jadex.commons.Tuple2<S,java.lang.Double>> results) |
protected void |
rankResults()
Rank the results and announce them
|
protected java.util.List<S> results
protected java.lang.Boolean finished
protected IServiceRanker<S> ranker
protected IRankingSearchTerminationDecider<S> decider
public ServiceRankingDelegationResultListener(jadex.commons.future.TerminableIntermediateDelegationFuture<S> future, jadex.commons.future.ITerminableIntermediateFuture<S> src, IServiceRanker<S> ranker, IRankingSearchTerminationDecider<S> decider)
public void customIntermediateResultAvailable(S result)
customIntermediateResultAvailable
in class jadex.commons.future.IntermediateDelegationResultListener<S>
public void customResultAvailable(java.util.Collection<S> result)
customResultAvailable
in class jadex.commons.future.IntermediateDelegationResultListener<S>
public void exceptionOccurred(java.lang.Exception exception)
exceptionOccurred
in interface jadex.commons.future.IFunctionalExceptionListener
exceptionOccurred
in class jadex.commons.future.IntermediateDelegationResultListener<S>
public void finished()
public boolean isFinished()
public boolean isFinishing()
protected void rankResults()
protected void notifyResults(java.util.List<jadex.commons.Tuple2<S,java.lang.Double>> results)
protected void notifyException(java.lang.Exception exception)