
Interface IMessage<T>
- Type Parameters:
- T- the type of the message payload. In most cases, T will be a subclass of- BaseJsonMessage
- All Known Implementing Classes:
- BaseJsonMessage,- ResourceOperationJsonMessage
public interface IMessage<T>
This interface is implemented by serializable "wrapper" message classes that are exchanged with Massage Brokers. HAPI-FHIR
 message classes implement both 
Message and IMessage so that they can
 be exchanged with both JMS and non-JMS brokers. These message wrappers wrap a serializable payload that is the main content
 of the message. This wrapper also contains meta-data about the message such as headers and a message key. The message key
 is used by non-JMS brokers for partition selection.- 
Method Details- 
getMessageKeyThe message key is used by brokers that support channel partitioning. The message key is used to determine which partition a message is stored on. If message order is important, then the same message key should be used for all messages that need to preserve their order. E.g. if a series of messages create, update, and delete a resource, the resource id would be a good candidate for the message key to ensure the order of operations is preserved on all messages concerning that resource.- Returns:
- the key of the message.
 
- 
getHeaders- Returns:
- a map of message headers
 
- 
getHeader- Returns:
- a header value as an Optional
 
- 
getPayloadT getPayload()- Returns:
- the de-serialized value of the message
 
- 
getHeadersAsStrings- Returns:
- headers as a String to String map where all values are replaced with their toString() value
 
- 
convertHeaderValuesToStringsConverts a map of headers with Object values to a map with String values. This utility method converts all header values to their string representation using toString().- Parameters:
- theHeaders- the headers map with Object values to convert
- Returns:
- a new map with the same keys but all values converted to strings
 
 
-