org.axonframework.eventhandling
Interface OrderResolver

All Known Implementing Classes:
SpringAnnotationOrderResolver

public interface OrderResolver

Interface describing a mechanism that provides the order for any given Event Listener. Listeners with a lower order should receive precedence over the instances with a higher value. The order of instances with default order is undefined.

Since:
2.1
Author:
Allard Buijze

Method Summary
 int orderOf(EventListener listener)
          Returns the order for the given listener.
 

Method Detail

orderOf

int orderOf(EventListener listener)
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.

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.