org.axonframework.eventhandling
Class SpringAnnotationOrderResolver

java.lang.Object
  extended by org.axonframework.eventhandling.SpringAnnotationOrderResolver
All Implemented Interfaces:
OrderResolver

public class SpringAnnotationOrderResolver
extends Object
implements OrderResolver

OrderResolver implementation that checks for @Order annotations on the type level. When such annotation is found, the value provided is used as order.

Since:
2.1
Author:
Allard Buijze

Constructor Summary
SpringAnnotationOrderResolver()
           
 
Method Summary
 int orderOf(EventListener listener)
          Returns the order for the given listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringAnnotationOrderResolver

public SpringAnnotationOrderResolver()
Method Detail

orderOf

public int orderOf(EventListener listener)
Description copied from interface: OrderResolver
Returns the order for the given listener.

Implementations should check whether the listener implements EventListenerProxy. In that case, use EventListenerProxy.getTargetType() to get access to the actual type handling the events.

Specified by:
orderOf in interface OrderResolver
Parameters:
listener - the listener to resolve the order for
Returns:
the order for the given listener, or 0 if no specific order is provided.


Copyright © 2010-2016. All Rights Reserved.