Interface MessageEnvelope<T>


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

    Modifier and Type
    Method
    Description
    The metadata associated with the message.
    static <T> MessageEnvelope<T>
    of(T payload)
    Create a message.
    static <T> MessageEnvelope<T>
    of(T payload, Metadata metadata)
    Create a message.
    The payload of the message.
  • Method Details

    • 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.