T - the contextual typepublic interface ContextualService<T extends Contextual>
Contextuals, according to given or calculated
Context state.
When functionality is provided to query data based upon a given
Set of Contexts, the querying code must consider which of the
underlying data is "applicable" to the contexts specified in the query
request. It is expected that implementations will deem entries of underlying
data to be applicable if the Set of contexts defined in the query
contain all of the Contexts required by the data entry.
Mathematically, an underlying data entry is "applicable" if
[the context of the entry] is a subset of [the context provided in the
query], or programmatically if [the context provided in the query]
Set.containsAll(Collection) of [the context of the entry].
| Modifier and Type | Method and Description |
|---|---|
void |
registerContextCalculator(ContextCalculator<T> calculator)
Registers a
ContextCalculator for use by this service. |
void registerContextCalculator(ContextCalculator<T> calculator)
ContextCalculator for use by this service.
It is not guaranteed that the calculator will be used by the service, as some implementations may not support contexts.
calculator - The context calculator to register