Class SagaMethodMessageHandlingMember<T>

java.lang.Object
org.axonframework.messaging.annotation.WrappedMessageHandlingMember<T>
org.axonframework.modelling.saga.SagaMethodMessageHandlingMember<T>
All Implemented Interfaces:
org.axonframework.messaging.annotation.MessageHandlingMember<T>

public class SagaMethodMessageHandlingMember<T> extends org.axonframework.messaging.annotation.WrappedMessageHandlingMember<T>
A data holder containing information of SagaEventHandler annotated methods.
Since:
2.0
Author:
Allard Buijze, Sofia Guy Ang
  • Constructor Summary

    Constructors
    Constructor
    Description
    SagaMethodMessageHandlingMember(org.axonframework.messaging.annotation.MessageHandlingMember<T> delegate, SagaCreationPolicy creationPolicy, String associationKey, String associationPropertyName, AssociationResolver associationResolver)
    Creates a SagaMethodMessageHandler.
  • Method Summary

    Modifier and Type
    Method
    Description
    getAssociationValue(org.axonframework.eventhandling.EventMessage<?> eventMessage)
    The AssociationValue to find the saga instance with, or null if no AssociationValue can be found on the given eventMessage.
    Returns the creation policy of the inspected method.
    handle(org.axonframework.messaging.Message<?> message, T target)
     

    Methods inherited from class org.axonframework.messaging.annotation.WrappedMessageHandlingMember

    annotationAttributes, attribute, canHandle, canHandleMessageType, canHandleType, hasAnnotation, payloadType, priority, unwrap

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.axonframework.messaging.annotation.MessageHandlingMember

    declaringClass, signature
  • Constructor Details

    • SagaMethodMessageHandlingMember

      public SagaMethodMessageHandlingMember(org.axonframework.messaging.annotation.MessageHandlingMember<T> delegate, SagaCreationPolicy creationPolicy, String associationKey, String associationPropertyName, AssociationResolver associationResolver)
      Creates a SagaMethodMessageHandler.
      Parameters:
      creationPolicy - The creation policy for the handlerMethod
      delegate - The message handler for the event
      associationKey - The association key configured for this handler
      associationPropertyName - The association property name to look up in the message
      associationResolver - The association resolver configured for this handler
  • Method Details

    • getAssociationValue

      public AssociationValue getAssociationValue(org.axonframework.eventhandling.EventMessage<?> eventMessage)
      The AssociationValue to find the saga instance with, or null if no AssociationValue can be found on the given eventMessage.
      Parameters:
      eventMessage - The event message containing the value of the association
      Returns:
      the AssociationValue to find the saga instance with, or null if none found
    • handle

      public Object handle(@Nonnull org.axonframework.messaging.Message<?> message, T target) throws Exception
      Specified by:
      handle in interface org.axonframework.messaging.annotation.MessageHandlingMember<T>
      Overrides:
      handle in class org.axonframework.messaging.annotation.WrappedMessageHandlingMember<T>
      Throws:
      Exception
    • getCreationPolicy

      public SagaCreationPolicy getCreationPolicy()
      Returns the creation policy of the inspected method.
      Returns:
      the creation policy of the inspected method