Package io.joynr.arbitration
Class ArbitrationStrategyFunction
- java.lang.Object
-
- io.joynr.arbitration.ArbitrationStrategyFunction
-
public abstract class ArbitrationStrategyFunction extends Object
Provide an implementation of this class as part of theDiscoveryQos(using one of the constructors which take this as an argument) in order to have control over which discovery entries are used as result of the arbitration.- See Also:
DiscoveryEntry,DiscoveryQos,ArbitrationStrategy
-
-
Constructor Summary
Constructors Constructor Description ArbitrationStrategyFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Optional<CustomParameter>findQosParameter(DiscoveryEntry discoveryEntry, String parameterName)protected abstract Set<DiscoveryEntryWithMetaInfo>select(Map<String,String> parameters, Collection<DiscoveryEntryWithMetaInfo> capabilities)Implement this method so that it selects all relevant, discovered capabilities which should be used in the result of the arbitration.
-
-
-
Method Detail
-
select
protected abstract Set<DiscoveryEntryWithMetaInfo> select(Map<String,String> parameters, Collection<DiscoveryEntryWithMetaInfo> capabilities)
Implement this method so that it selects all relevant, discovered capabilities which should be used in the result of the arbitration.- Parameters:
parameters- the parameters which can be used during selection.capabilities- the list of candidate discovery entries from which to select the relevant ones.- Returns:
- the collection of discovery entries which should be used in the
arbitration result. A value of
nullor an empty collection are used to indicate that there was no match.
-
findQosParameter
protected Optional<CustomParameter> findQosParameter(DiscoveryEntry discoveryEntry, String parameterName)
-
-