Class PayloadAssociationResolver

java.lang.Object
org.axonframework.modelling.saga.PayloadAssociationResolver
All Implemented Interfaces:
AssociationResolver

public class PayloadAssociationResolver extends Object implements AssociationResolver
Used to derive the value of an association property by looking it up the event message's payload.
Author:
Sofia Guy Ang
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> Object
    resolve(String associationPropertyName, org.axonframework.eventhandling.EventMessage<?> message, org.axonframework.messaging.annotation.MessageHandlingMember<T> handler)
    Finds the association property value in the message's payload.
    <T> void
    validate(String associationPropertyName, org.axonframework.messaging.annotation.MessageHandlingMember<T> handler)
    Validates that the association property name exists as checked with the payload type.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PayloadAssociationResolver

      public PayloadAssociationResolver()
  • Method Details

    • validate

      public <T> void validate(@Nonnull String associationPropertyName, @Nonnull org.axonframework.messaging.annotation.MessageHandlingMember<T> handler)
      Validates that the association property name exists as checked with the payload type. This is done by attempting to create a Property. It also caches the resulting Property instance.
      Specified by:
      validate in interface AssociationResolver
    • resolve

      public <T> Object resolve(@Nonnull String associationPropertyName, @Nonnull org.axonframework.eventhandling.EventMessage<?> message, @Nonnull org.axonframework.messaging.annotation.MessageHandlingMember<T> handler)
      Finds the association property value in the message's payload.
      Specified by:
      resolve in interface AssociationResolver