Interface MessageEnvelope<T>


  • public interface MessageEnvelope<T>
    A message envelope.
    • Method Detail

      • metadata

        Metadata metadata()
        The metadata associated with the message.
        Returns:
        The metadata.
      • payload

        T payload()
        The payload of the message.
        Returns:
        The payload.
      • of

        static <T> MessageEnvelope<T> of​(T payload)
        Create a message.
        Parameters:
        payload - The payload of the message.
        Returns:
        The message.
      • of

        static <T> MessageEnvelope<T> of​(T payload,
                                         Metadata metadata)
        Create a message.
        Parameters:
        payload - The payload of the message.
        metadata - The metadata associated with the message.
        Returns:
        The message.