Class MethodSequencingPolicyEventHandlerDefinition
java.lang.Object
org.axonframework.messaging.eventhandling.annotation.MethodSequencingPolicyEventHandlerDefinition
- All Implemented Interfaces:
HandlerEnhancerDefinition
public class MethodSequencingPolicyEventHandlerDefinition
extends Object
implements HandlerEnhancerDefinition
Definition of
event handlers that are annotated with SequencingPolicy. These
handlers are wrapped with a MethodSequencingPolicyEventHandlerDefinition.SequencingPolicyEventMessageHandlingMember that provides access to the configured
sequencing policy.
The SequencingPolicy annotation can be applied either directly to the handler method or to the declaring
class. When applied to the class, all handler methods in that class will inherit the sequencing policy. Method-level
annotations take precedence over class-level annotations.
- Since:
- 5.0.0
- Author:
- Mateusz Nowak
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> MessageHandlingMember<T> wrapHandler(MessageHandlingMember<T> original) Enhance the givenoriginalhandler.
-
Constructor Details
-
MethodSequencingPolicyEventHandlerDefinition
public MethodSequencingPolicyEventHandlerDefinition()
-
-
Method Details
-
wrapHandler
@Nonnull public <T> MessageHandlingMember<T> wrapHandler(@Nonnull MessageHandlingMember<T> original) Description copied from interface:HandlerEnhancerDefinitionEnhance the givenoriginalhandler. Implementations may return the original message handler.- Specified by:
wrapHandlerin interfaceHandlerEnhancerDefinition- Type Parameters:
T- The type of object that will perform the actual handling of the message- Parameters:
original- The original message handler- Returns:
- The enhanced message handler
-