org.eclipse.swordfish.internal.core.planner
Class SortingStrategyImpl
java.lang.Object
org.eclipse.swordfish.internal.core.planner.SortingStrategyImpl
- All Implemented Interfaces:
- SortingStrategy, Strategy
public class SortingStrategyImpl
- extends java.lang.Object
- implements SortingStrategy
- Author:
- dwolz
|
Method Summary |
int |
getPriority()
Indicates the ordering if several unified strategies can be applied. |
void |
setSortingStrategies(java.util.List<SortingStrategy> sortingStrategies)
|
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 class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SortingStrategyImpl
public SortingStrategyImpl()
sort
public java.util.List<Interceptor> sort(java.util.Set<Interceptor> interceptors,
ReadOnlyRegistry<Interceptor> registry,
javax.jbi.messaging.MessageExchange exchange)
- Description copied from interface:
SortingStrategy
- 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.
- Specified by:
sort in interface SortingStrategy
- 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.
- Returns:
- the filtered interceptor chain (must not be
null).
getPriority
public int getPriority()
- Description copied from interface:
Strategy
- Indicates the ordering if several unified strategies can be applied.
- Specified by:
getPriority in interface Strategy
setSortingStrategies
public void setSortingStrategies(java.util.List<SortingStrategy> sortingStrategies)