
Class BaseResourceMessage
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IModelJson,IHasPayloadMessageKey,IResourceMessage
- Direct Known Subclasses:
BaseResourceModifiedMessage
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface ca.uhn.fhir.model.api.IModelJson
SENSITIVE_DATA_FILTER_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCopies any attributes from the given message into this messsage.booleangetAttribute(String theKey) Returns an attribute stored in this message.Returns theBaseResourceMessage.OperationTypeEnumthat is occurring to the Resource of the messageabstract ca.uhn.fhir.interceptor.model.RequestPartitionIdRetrieve the transaction ID related to this message.inthashCode()voidsetAttribute(String theKey, String theValue) Sets an attribute stored in this message.voidsetMediaType(String theMediaType) voidsetOperationType(BaseResourceMessage.OperationTypeEnum theOperationType) Sets theBaseResourceMessage.OperationTypeEnumoccuring to the resource of the message.abstract voidsetPartitionId(ca.uhn.fhir.interceptor.model.RequestPartitionId thePartitionId) voidsetPayloadMessageKey(String thePayloadMessageKey) In cases where the IMessage extracts the message key from the payload, this method can be used to set the message key that will be used.voidsetTransactionId(String theTransactionId) Adds a transaction ID to this message.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ca.uhn.fhir.rest.server.messaging.IResourceMessage
getPayloadId, setPayloadId
-
Field Details
-
myOperationType
-
-
Constructor Details
-
BaseResourceMessage
public BaseResourceMessage()
-
-
Method Details
-
getPartitionId
-
setPartitionId
public abstract void setPartitionId(ca.uhn.fhir.interceptor.model.RequestPartitionId thePartitionId) -
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.OperationTypeEnumthat is occurring to the Resource of the message- Returns:
- the operation type.
-
setOperationType
Sets theBaseResourceMessage.OperationTypeEnumoccuring 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
-
getPayloadMessageKey
- Specified by:
getPayloadMessageKeyin interfaceIHasPayloadMessageKey- Returns:
- a message key derived from the payload
-
setPayloadMessageKey
Description copied from interface:IResourceMessageIn cases where the IMessage extracts the message key from the payload, this method can be used to set the message key that will be used. SeeIMessage.getMessageKey()andIHasPayloadMessageKey.getPayloadMessageKey()- Specified by:
setPayloadMessageKeyin interfaceIResourceMessage- Parameters:
thePayloadMessageKey- the message key that should be used for the message delivering this payload
-
getAttributes
-
equals
-
hashCode
-