Interface ContextAwareMessagingMessageConverter<S>

All Superinterfaces:
MessagingMessageConverter<S>
All Known Implementing Classes:
AbstractMessagingMessageConverter, SqsMessagingMessageConverter

public interface ContextAwareMessagingMessageConverter<S> extends MessagingMessageConverter<S>
A MessagingMessageConverter specialization that enables receving a MessageConversionContext that can be used to add context specific properties to the converted message.
Since:
3.0
Author:
Tomaz Fernandes
See Also:
  • Method Details

    • toMessagingMessage

      default Message<?> toMessagingMessage(S source)
      Description copied from interface: MessagingMessageConverter
      Convert a source message from a specific messaging system to a Message.
      Specified by:
      toMessagingMessage in interface MessagingMessageConverter<S>
      Parameters:
      source - the source message.
      Returns:
      the converted message.
    • fromMessagingMessage

      default S fromMessagingMessage(Message<?> message)
      Description copied from interface: MessagingMessageConverter
      Convert a Message to a message from a specific messaging system.
      Specified by:
      fromMessagingMessage in interface MessagingMessageConverter<S>
      Parameters:
      message - the message from which to convert.
      Returns:
      the system specific message.
    • toMessagingMessage

      Message<?> toMessagingMessage(S source, @Nullable MessageConversionContext context)
      Convert a source message from a specific messaging system to a Message with an optional context.
      Parameters:
      source - the source message.
      context - an optional context with information to be used in the conversion process.
      Returns:
      the converted message.
    • fromMessagingMessage

      S fromMessagingMessage(Message<?> message, @Nullable MessageConversionContext context)
      Convert a Message to a message from a specific messaging system.
      Parameters:
      message - the message from which to convert.
      context - an optional context with information to be used in the conversion process.
      Returns:
      the system specific message.
    • createMessageConversionContext

      @Nullable MessageConversionContext createMessageConversionContext()
      An optional context to be used in the conversion process.
      Returns:
      the context.