Class BaseResourceMessage
- java.lang.Object
-
- ca.uhn.fhir.jpa.subscription.module.subscriber.BaseResourceMessage
-
- All Implemented Interfaces:
IResourceMessage
- Direct Known Subclasses:
ResourceDeliveryMessage,ResourceModifiedMessage
public abstract class BaseResourceMessage extends Object implements IResourceMessage
-
-
Constructor Summary
Constructors Constructor Description BaseResourceMessage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyAdditionalPropertiesFrom(BaseResourceMessage theMsg)Copies any attributes from the given message into this messsage.Optional<String>getAttribute(String theKey)Returns an attribute stored in this message.voidsetAttribute(String theKey, String theValue)Sets an attribute stored in this message.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ca.uhn.fhir.jpa.subscription.module.subscriber.IResourceMessage
getPayloadId
-
-
-
-
Constructor Detail
-
BaseResourceMessage
public BaseResourceMessage()
-
-
Method Detail
-
getAttribute
public Optional<String> getAttribute(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)
-
copyAdditionalPropertiesFrom
public void copyAdditionalPropertiesFrom(BaseResourceMessage theMsg)
Copies any attributes from the given message into this messsage.- See Also:
setAttribute(String, String),getAttribute(String)
-
-