org.eclipse.swordfish.core.planner.strategy
Interface FilterStrategy
- All Superinterfaces:
- Strategy
- All Known Implementing Classes:
- CoreFilterStrategy, FilterStrategyImpl, PolicyBasedFilterStrategy
public interface FilterStrategy
- extends Strategy
The strategy that can remove some interceptors from the interceptor chain
based on the supplied hints.
Supposed to be plugged into the Swordfish framework as an osgi service.
| Methods inherited from interface org.eclipse.swordfish.core.planner.strategy.Strategy |
getPriority |
filter
java.util.List<Interceptor> filter(java.util.List<Interceptor> interceptors,
ReadOnlyRegistry<Interceptor> registry,
java.util.List<Hint<?>> hints)
- Create and return an interceptor chain with the interceptors which
shall process subsequent message exchanges. The following rules apply
for filtering:
- The original interceptor chain must not be modified. Either the
unmodified List of interceptors is returned, or a new List with the
interceptors which have passed the filter is created.
- The interceptors in the List returned are in the same order as
in the original interceptor chain, the only difference is that
interceptors which are filtered out are not present in the result
List.
- Parameters:
interceptors - - the interceptor chain to be filtered. This
original List will not be modified.registry - - the interceptor registry containing property data
for the interceptors of the chain using the corresponding interceptor
instance as key. The properties are merged by Swordfish from the
properties returned by the getProperties() method of
the interceptor, the property dictionary provided at OSGI service
registration, and the Swordfish configuration. Values from the
Swordfish configuration have precedence over those provided at OSGI
service registration. Hard-coded properties from the
getProperties() method have lowest precedence.hints - - If a HintExtractor has been registered, the List of
Hints extracted from the current message exchange is provided in this
argument. Otherwise, it is null.
- Returns:
- the filtered interceptor chain (must not be
null).