Interface CommonInterceptOutgoingMessagesContext

All Known Subinterfaces:
MatsInitiateInterceptor.InitiateInterceptOutgoingMessagesContext, MatsStageInterceptor.StageInterceptOutgoingMessageContext

public interface CommonInterceptOutgoingMessagesContext
Common elements of intercepting messages for both Initiate and Stage.
  • Method Details

    • getOutgoingMessages

      Returns:
      the current list of outgoing messages after the user lambda have run - and after previous interceptors have run, which might have added, or removed messages.
    • initiate

      void initiate(MatsInitiator.InitiateLambda lambda)
      To add a new message, you may initiate it here. Notice that any interceptors that are invoked later than this (interceptor was added later) will have this message show up in its getOutgoingMessages().
    • cancelOutgoingMessage

      void cancelOutgoingMessage(String matsMessageId)
      To remove an outgoing message, you may invoke this method, providing the unique MatsMessageId. Notice that any interceptors that are invoked later than this (interceptor was added later) will thus not see this message in its getOutgoingMessages().
      Parameters:
      matsMessageId - the unique MatsMessageId, gotten from MatsOutgoingMessage.getMatsMessageId().