Class BaseResourceMessage

    • Method Detail

      • getAttribute

        public Optional<StringgetAttribute​(String theKey)
        Returns an attribute stored in this message.

        Attributes are just a spot for user data of any kind to be added to the message for pasing along the subscription processing pipeline (typically by interceptors). Values will be carried from the beginning to the end.

        Note that messages are designed to be passed into queueing systems and serialized as JSON. As a result, only strings are currently allowed as values.

      • setAttribute

        public void setAttribute​(String theKey,
                                 String theValue)
        Sets an attribute stored in this message.

        Attributes are just a spot for user data of any kind to be added to the message for passing along the subscription processing pipeline (typically by interceptors). Values will be carried from the beginning to the end.

        Note that messages are designed to be passed into queueing systems and serialized as JSON. As a result, only strings are currently allowed as values.

        Parameters:
        theKey - The key (must not be null or blank)
        theValue - The value (must not be null)
      • setTransactionId

        public void setTransactionId​(String theTransactionId)
        Adds a transaction ID to this message. This ID can be used for many purposes. For example, performing tracing across asynchronous hooks, tying data together, or downstream logging purposes. One current internal implementation uses this field to tie back EMPI processing results (which are asynchronous) to the original transaction log that caused the EMPI processing to occur.
        Parameters:
        theTransactionId - An ID representing a transaction of relevance to this message.