org.eclipse.swordfish.core.planner.strategy
Interface SortingStrategy
- All Superinterfaces:
- Strategy
- All Known Implementing Classes:
- CoreSortingStrategy, SortingStrategyImpl
public interface SortingStrategy
- extends Strategy
The strategy that can change the order of interceptors in the interceptor
chain based on the supplied hints.
Supposed to be plugged into the Swordfish framework as an osgi service.
|
Method Summary |
java.util.List<Interceptor> |
sort(java.util.Set<Interceptor> interceptors,
ReadOnlyRegistry<Interceptor> registry,
javax.jbi.messaging.MessageExchange exchange)
Create and return an interceptor chain with the interceptors of the
original chain in the order in which they shall be invoked in order to
process subsequent message exchanges. |
| Methods inherited from interface org.eclipse.swordfish.core.planner.strategy.Strategy |
getPriority |
sort
java.util.List<Interceptor> sort(java.util.Set<Interceptor> interceptors,
ReadOnlyRegistry<Interceptor> registry,
javax.jbi.messaging.MessageExchange exchange)
- Create and return an interceptor chain with the interceptors of the
original chain in the order in which they shall be invoked in order to
process subsequent message exchanges. The following rules apply
for sorting:
- The original interceptor chain must not be modified. Either the
unmodified List of interceptors is returned, or a new List with the
interceptors in the new order for processing.
- All interceptors from the original inteceptor List are returned,
but in the order they shall process message exchanges.
- Parameters:
interceptors - - the interceptor chain to be sorted. 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.role - 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).