Class RoutingKeyEventTargetMatcherDefinition
java.lang.Object
org.axonframework.modelling.entity.annotation.RoutingKeyEventTargetMatcherDefinition
- All Implemented Interfaces:
EventTargetMatcherDefinition
public class RoutingKeyEventTargetMatcherDefinition
extends Object
implements EventTargetMatcherDefinition
Definition for creating
EventTargetMatcher instances based on the routing key definitions.
The routing key of the message is determined by the EntityMember.routingKey() annotation on the declaring
member in the parent entity, or the RoutingKey annotation on the child entity's member if absent. The routing
key of the child entity is determined by the RoutingKey on a member of the child entity class.
The routing key of the message and of the entity are then matched to determine if a child entity should handle a given message.
- Since:
- 5.0.0
- Author:
- Mitchell Herrijgers
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<E> EventTargetMatcher<E> createChildEntityMatcher(AnnotatedEntityMetamodel<E> entity, Member member)
-
Constructor Details
-
RoutingKeyEventTargetMatcherDefinition
public RoutingKeyEventTargetMatcherDefinition()
-
-
Method Details
-
createChildEntityMatcher
@Nonnull public <E> EventTargetMatcher<E> createChildEntityMatcher(@Nonnull AnnotatedEntityMetamodel<E> entity, @Nonnull Member member) Description copied from interface:EventTargetMatcherDefinition- Specified by:
createChildEntityMatcherin interfaceEventTargetMatcherDefinition- Type Parameters:
E- The type of the child entity.- Parameters:
entity- TheAnnotatedEntityMetamodelrepresenting the child entity.member- The member that represents the child entity in the parent entity metamodel. This member is typically a field or a method that returns the child entity, annotated withEntityMember.- Returns:
- An
EventTargetMatcherthat can be used to match child entities against messages.
-