Class MessageAmendInfo


  • public class MessageAmendInfo
    extends Object
    Small data class used to hold information that may be used differently depending on the context For sending messages, the headers stored in the object may be used to append to existing headers, where it won't overwrite an existing one that may be outgoing. The payload may or may not be used. Refer to the method that accepts or expects this structure to understand what parts are used and which are not. For example, for EventStreamRPCConnection's connect() method, the headers are used verbatim into the activate request and the payload too. For a sendStreamEvent(obj, amendInfo) hypothetical overload, only the headers that don't overwrite :content-type, service-model-type would be used, and the payload would be completely ignored from this structure.
    • Constructor Detail

      • MessageAmendInfo

        public MessageAmendInfo​(List<software.amazon.awssdk.crt.eventstream.Header> headers,
                                byte[] payload)
        Constructs a new MessageAmendInfo
        Parameters:
        headers - The headers to store
        payload - The payload to store
    • Method Detail

      • getHeaders

        public List<software.amazon.awssdk.crt.eventstream.Header> getHeaders()
        Returns the headers stored in the object. For sent messages, the headers stored in the object may be used to append to existing headers, where it won't overwrite an existing one that may be outgoing.
        Returns:
        The headers stored
      • getPayload

        public byte[] getPayload()
        Returns the payload stored in the object. A payload may, or may not, be used in a given MessageAmendInfo. Refer to the method that accepts or expects this structure to understand what parts are used and which are not.
        Returns:
        The payload stored