Interface CommandEnvelope<T>


public interface CommandEnvelope<T>
A command envelope.
  • Method Summary

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

    • metadata

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

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

      static <T> CommandEnvelope<T> of(T payload)
      Create a command envelope.
      Parameters:
      payload - The payload of the command.
      Returns:
      The command envelope.
    • of

      static <T> CommandEnvelope<T> of(T payload, Metadata metadata)
      Create a command envelope.
      Parameters:
      payload - The payload of the command.
      metadata - The metadata associated with the command.
      Returns:
      The command envelope.