org.eclipse.swordfish.internal.core.planner
Class CoreSortingStrategy

java.lang.Object
  extended by org.eclipse.swordfish.internal.core.planner.CoreSortingStrategy
All Implemented Interfaces:
SortingStrategy, Strategy

public class CoreSortingStrategy
extends java.lang.Object
implements SortingStrategy

Author:
dwolz

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.swordfish.core.planner.strategy.SortingStrategy
SortingStrategy.Role
 
Field Summary
static java.lang.String PRIORITY_KEYWORD
           
 
Constructor Summary
CoreSortingStrategy()
           
 
Method Summary
 int getPriority()
          Indicates the ordering if several unified strategies can be applied.
 java.util.List<Interceptor> sort(java.util.Set<Interceptor> interceptors, ReadOnlyRegistry<Interceptor> registry, javax.jbi.messaging.MessageExchange messageExchange)
          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
 

Field Detail

PRIORITY_KEYWORD

public static final java.lang.String PRIORITY_KEYWORD
See Also:
Constant Field Values
Constructor Detail

CoreSortingStrategy

public CoreSortingStrategy()
Method Detail

sort

public java.util.List<Interceptor> sort(java.util.Set<Interceptor> interceptors,
                                        ReadOnlyRegistry<Interceptor> registry,
                                        javax.jbi.messaging.MessageExchange messageExchange)
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:

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