Class BaseResourceMessage
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IModelJson
,IResourceMessage
- Direct Known Subclasses:
BaseResourceModifiedMessage
-
Nested Class Summary
-
Field Summary
Fields inherited from interface ca.uhn.fhir.model.api.IModelJson
SENSITIVE_DATA_FILTER_NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Copies any attributes from the given message into this messsage.boolean
getAttribute
(String theKey) Returns an attribute stored in this message.protected String
Provides a fallback value when methodgetMessageKey()
returnsnull
.Deprecated.Returns theBaseResourceMessage.OperationTypeEnum
that is occurring to the Resource of the messageRetrieve the transaction ID related to this message.int
hashCode()
void
setAttribute
(String theKey, String theValue) Sets an attribute stored in this message.void
setMediaType
(String theMediaType) void
setMessageKey
(String theMessageKey) void
setOperationType
(BaseResourceMessage.OperationTypeEnum theOperationType) Sets theBaseResourceMessage.OperationTypeEnum
occuring to the resource of the message.void
setTransactionId
(String theTransactionId) Adds a transaction ID to this message.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ca.uhn.fhir.rest.server.messaging.IResourceMessage
getPayloadId
-
Field Details
-
myOperationType
-
-
Constructor Details
-
BaseResourceMessage
public BaseResourceMessage()
-
-
Method Details
-
getAttribute
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
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
Copies any attributes from the given message into this messsage.- See Also:
-
getOperationType
Returns theBaseResourceMessage.OperationTypeEnum
that is occurring to the Resource of the message- Returns:
- the operation type.
-
setOperationType
Sets theBaseResourceMessage.OperationTypeEnum
occuring to the resource of the message.- Parameters:
theOperationType
- The operation type to set.
-
getTransactionId
Retrieve the transaction ID related to this message.- Returns:
- the transaction ID, or null.
-
setTransactionId
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 MDM processing results (which are asynchronous) to the original transaction log that caused the MDM processing to occur.
- Parameters:
theTransactionId
- An ID representing a transaction of relevance to this message.
-
getMediaType
-
setMediaType
-
getMessageKeyOrNull
Deprecated. -
getMessageKey
-
setMessageKey
-
getMessageKeyOrDefault
- Returns:
- the message key value or default
-
getMessageKeyDefaultValue
Provides a fallback value when methodgetMessageKey()
returnsnull
.- Returns:
- null by default
-
getAttributes
-
equals
-
hashCode
-