Class HandlerComparator
java.lang.Object
org.axonframework.messaging.core.annotation.HandlerComparator
Comparator used by
AnnotatedHandlerInspector to sort MessageHandlingMember entity members.
The ordering among MessageHandlingMembers through this comparator is defined as follows:
- The
MessageHandlingMember.priority(), favoring the largest number - The class hierarchy of the
MessageHandlingMember.payloadType(), favoring the most specific handler. - The parameter count on the actual message handling function, favoring the highest number as the most specific handler.
- As a final tiebreaker, the
Executable.toGenericString()of the actual message handling function
MessageHandlingMembers both act on results rather, steps 2 through 4 are reversed.- Since:
- 3.0.0
- Author:
- Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptionstatic Comparator<MessageHandlingMember<?>> instance()Returns the singleton comparator managed by the HandlerComparator class.
-
Method Details
-
instance
Returns the singleton comparator managed by the HandlerComparator class.- Returns:
- the singleton comparator
-