Package com.mirth.connect.userutil
Class ImmutableMessage
java.lang.Object
com.mirth.connect.userutil.ImmutableMessage
This class represents an overall message and is used to retrieve details such as the message ID,
specific connector messages, or the merged connector message.
-
Constructor Summary
ConstructorsConstructorDescriptionImmutableMessage(com.mirth.connect.donkey.model.message.Message message) Instantiates a new ImmutableMessage object. -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of attachments associated with this message.Returns the ID of the channel associated with this message.Returns a map of connector messages associated with this message.Returns a Map of destination connector names linked to their corresponding connector metadata ID.Deprecated.This method is deprecated and will soon be removed.Returns the ID of the original channel this message was reprocessed from.Returns the ID of the original message this one was imported from.Returns a "merged" connector message containing data from all connector messages combined.Returns the sequential ID of this message, as a Long.Returns the ID of the original message this one was reprocessed from.Deprecated.This method is deprecated and will soon be removed.Returns the ID of the server associated with this message.booleanReturns whether this message has finished processing through a channel.toString()
-
Constructor Details
-
ImmutableMessage
public ImmutableMessage(com.mirth.connect.donkey.model.message.Message message) Instantiates a new ImmutableMessage object.- Parameters:
message- The Message object that this object will reference for retrieving data.
-
-
Method Details
-
getMessageId
Returns the sequential ID of this message, as a Long.- Returns:
- The sequential ID of this message, as a Long.
-
getServerId
Returns the ID of the server associated with this message.- Returns:
- The ID of the server associated with this message.
-
getChannelId
Returns the ID of the channel associated with this message.- Returns:
- The ID of the channel associated with this message.
-
getReceivedDate
Deprecated.This method is deprecated and will soon be removed. This method currently returns the received date of the source connector message.Returns the original date/time that this message was created by the channel. If the message is reprocessed at a later point, this date will remain the same and instead the connector message received dates will be updated.- Returns:
- The original date/time that this message was created by the channel.
-
isProcessed
public boolean isProcessed()Returns whether this message has finished processing through a channel. A message is considered "processed" if it correctly flows through each applicable connector and the postprocessor script finishes. Even if a non-fatal error occurs on a particular connector message and the status ends up as ERROR, or if a message is queued by a destination and has not yet been sent to the outbound system, it can still be considered processed.- Returns:
- A boolean indicating whether this message has finished processing through a channel.
-
getOriginalId
Returns the ID of the original message this one was reprocessed from.- Returns:
- The ID of the original message this one was reprocessed from.
-
getImportId
Returns the ID of the original message this one was imported from.- Returns:
- The ID of the original message this one was imported from.
-
getImportChannelId
Returns the ID of the original channel this message was reprocessed from.- Returns:
- The ID of the original channel this message was reprocessed from.
-
getAttachments
Returns a list of attachments associated with this message. This will only be populated in certain cases, such as when a message is being exported or archived.- Returns:
- A list of attachments associated with this message.
-
getConnectorMessages
Returns a map of connector messages associated with this message. The keys are the metadata IDs (as Integer objects), and the values are the connector messages themselves.- Returns:
- A map of connector messages associated with this message.
-
getMergedConnectorMessage
Returns a "merged" connector message containing data from all connector messages combined. The raw and processed raw content is copied from the source connector, while values in the channel and response maps are copied from all connectors.- Returns:
- A "merged" connector message containing data from all connector messages combined.
-
getDestinationNameMap
Deprecated.This method is deprecated and will soon be removed. Please usegetDestinationIdMap()instead.Returns a Map of destination connector names linked to their corresponding "d#" response map keys (where "#" is the destination connector metadata ID).- Returns:
- A Map of destination connector names linked to their corresponding "d#" response map keys.
-
getDestinationIdMap
Returns a Map of destination connector names linked to their corresponding connector metadata ID.- Returns:
- A Map of destination connector names linked to their corresponding connector metadata ID.
-
toString
-