Interface Message<HEADER,​BODY>

Type Parameters:
HEADER - The type of the head of the Message describing the Message (e.g. recipients).
BODY - The type of the payload being carried by the Message.
All Superinterfaces:
BodyAccessor<BODY>, HeaderAccessor<HEADER>

public interface Message<HEADER,​BODY>
extends HeaderAccessor<HEADER>, BodyAccessor<BODY>
A Message consists of the least required information to send a message.
  • Method Details

    • getHeader

      HEADER getHeader()
      Retrieves the value from the header property. The header describes the Message.
      Specified by:
      getHeader in interface HeaderAccessor<HEADER>
      Returns:
      The header stored by the header property.
    • getBody

      BODY getBody()
      Retrieves the value from the body property. Retrieves the payload carried by the Message.
      Specified by:
      getBody in interface BodyAccessor<HEADER>
      Returns:
      The according payload.