com.holonplatform.core.messaging

## Interface Message<P,H>

- Type Parameters:
    `P` - Message payload type
    `H` - Message headers value type
  All Superinterfaces:
    MessageHeaders<H>
  All Known Subinterfaces:
    HttpMessage<P>, HttpRequest, HttpResponse<T>, ResponseEntity<T>, ServletHttpRequest

      public interface Message<P,H>
      extends MessageHeaders<H>

  Generic message representation with headers and payload.
  Since:
    5.0.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Optional<P>` | `getPayload()` Message payload
    `Class<? extends P>` | `getPayloadType()` Message payload type
    `Optional<String>` | `getProtocol()` Protocol name with which message was delivered

    - ### Methods inherited from interface com.holonplatform.core.messaging.MessageHeaders

      `getHeader, getHeaders`

- - ### Method Detail

    - #### getProtocol

          Optional<String> getProtocol()

      Protocol name with which message was delivered
      Returns:
        Optional Protocol name

    - #### getPayload

          Optional<P> getPayload()
                          throws UnsupportedOperationException

      Message payload
      Returns:
        Optional message payload
      Throws:
        `UnsupportedOperationException` - If this kind of message does not support a payload

    - #### getPayloadType

          Class<? extends P> getPayloadType()
                                     throws UnsupportedOperationException

      Message payload type
      Returns:
        Payload type
      Throws:
        `UnsupportedOperationException` - If this kind of message does not support a payload

Copyright © 2019 The Holon Platform. All rights reserved.