Class EndSagaMessageHandlerDefinition.EndSageMessageHandlingMember<T>

java.lang.Object
org.axonframework.messaging.annotation.WrappedMessageHandlingMember<T>
org.axonframework.modelling.saga.EndSagaMessageHandlerDefinition.EndSageMessageHandlingMember<T>
Type Parameters:
T - the entity type wrapped by this MessageHandlingMember
All Implemented Interfaces:
MessageHandlingMember<T>
Enclosing class:
EndSagaMessageHandlerDefinition

public static class EndSagaMessageHandlerDefinition.EndSageMessageHandlingMember<T> extends WrappedMessageHandlingMember<T>
A WrappedMessageHandlingMember implementation dedicated towards MessageHandlingMembers annotated with EndSaga. After invocation of the handle(Message, Object) method, the saga's is ended through the SagaLifecycle.end() method.
  • Constructor Details

    • EndSageMessageHandlingMember

      protected EndSageMessageHandlingMember(MessageHandlingMember<T> delegate)
      Initializes the member using the given delegate.
      Parameters:
      delegate - the actual message handling member to delegate to
  • Method Details

    • handle

      public Object handle(@Nonnull Message<?> message, @Nullable T target) throws Exception
      Description copied from interface: MessageHandlingMember
      Handles the given message by invoking the appropriate method on given target. This may result in an exception if the given target is not capable of handling the message or if an exception is thrown during invocation of the method.
      Specified by:
      handle in interface MessageHandlingMember<T>
      Overrides:
      handle in class WrappedMessageHandlingMember<T>
      Parameters:
      message - The message to handle
      target - The target to handle the message
      Returns:
      The message handling result in case the invocation was successful
      Throws:
      Exception - when there was a problem that prevented invocation of the method or if an exception was thrown from the invoked method