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 Details

    • MethodSequencingPolicyEventHandlerDefinition

      public MethodSequencingPolicyEventHandlerDefinition()
  • Method Details

    • wrapHandler

      @Nonnull public <T> MessageHandlingMember<T> wrapHandler(@Nonnull MessageHandlingMember<T> original)
      Description copied from interface: HandlerEnhancerDefinition
      Enhance the given original handler. Implementations may return the original message handler.
      Specified by:
      wrapHandler in interface HandlerEnhancerDefinition
      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