Class RawMessage
java.lang.Object
com.mirth.connect.server.userutil.RawMessage
This class represents a raw message as it is received by a channel, and is used to retrieve
details such as the raw data or source map.
-
Constructor Summary
ConstructorsConstructorDescriptionRawMessage(byte[] rawBytes) Instantiates a RawMessage object to dispatch to a channel.RawMessage(byte[] rawBytes, Collection<Number> destinationMetaDataIds) Instantiates a RawMessage object to dispatch to a channel.RawMessage(byte[] rawBytes, Collection<Number> destinationMetaDataIds, Map<String, Object> sourceMap) Instantiates a RawMessage object to dispatch to a channel.RawMessage(String rawData) Instantiates a RawMessage object to dispatch to a channel.RawMessage(String rawData, Collection<Number> destinationMetaDataIds) Instantiates a RawMessage object to dispatch to a channel.RawMessage(String rawData, Collection<Number> destinationMetaDataIds, Map<String, Object> sourceMap) Instantiates a RawMessage object to dispatch to a channel. -
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves references to any data (textual or binary) currently stored by the raw message.Deprecated.This method is deprecated and will soon be removed.Returns the collection of integers (metadata IDs) representing which destinations to dispatch the message to.byte[]Returns the binary data (byte array) to be dispatched to a channel.Returns the textual data to be dispatched to a channel.Returns the source map to be used at the beginning of the channel dispatch.isBinary()Returns a Boolean representing whether this object contains textual or binary data.voidsetChannelMap(Map<String, Object> channelMap) Deprecated.This method is deprecated and will soon be removed.voidsetDestinationMetaDataIds(Collection<Number> destinationMetaDataIds) Sets which destinations to dispatch the message to.voidsetSourceMap(Map<String, Object> sourceMap) Sets the source map to be used at the beginning of the channel dispatch.
-
Constructor Details
-
RawMessage
Instantiates a RawMessage object to dispatch to a channel.- Parameters:
rawData- The textual data to dispatch to the channel.
-
RawMessage
Instantiates a RawMessage object to dispatch to a channel.- Parameters:
rawData- The textual data to dispatch to the channel.destinationMetaDataIds- A collection of integers (metadata IDs) representing which destinations to dispatch the message to. JavaScript arrays can be used.
-
RawMessage
public RawMessage(String rawData, Collection<Number> destinationMetaDataIds, Map<String, Object> sourceMap) Instantiates a RawMessage object to dispatch to a channel.- Parameters:
rawData- The textual data to dispatch to the channel.destinationMetaDataIds- A collection of integers (metadata IDs) representing which destinations to dispatch the message to. JavaScript arrays can be used.sourceMap- Any values placed in this map will be populated in the source map at the beginning of the message's lifecycle.
-
RawMessage
public RawMessage(byte[] rawBytes) Instantiates a RawMessage object to dispatch to a channel.- Parameters:
rawBytes- The binary data (byte array) to dispatch to the channel.
-
RawMessage
Instantiates a RawMessage object to dispatch to a channel.- Parameters:
rawBytes- The binary data (byte array) to dispatch to the channel.destinationMetaDataIds- A collection of integers (metadata IDs) representing which destinations to dispatch the message to. JavaScript arrays can be used.
-
RawMessage
public RawMessage(byte[] rawBytes, Collection<Number> destinationMetaDataIds, Map<String, Object> sourceMap) Instantiates a RawMessage object to dispatch to a channel.- Parameters:
rawBytes- The binary data (byte array) to dispatch to the channel.destinationMetaDataIds- A collection of integers (metadata IDs) representing which destinations to dispatch the message to. JavaScript arrays can be used.sourceMap- Any values placed in this map will be populated in the source map at the beginning of the message's lifecycle.
-
-
Method Details
-
getRawData
Returns the textual data to be dispatched to a channel.- Returns:
- The textual data to be dispatched to a channel.
-
getRawBytes
public byte[] getRawBytes()Returns the binary data (byte array) to be dispatched to a channel.- Returns:
- The binary data (byte array) to be dispatched to a channel.
-
getDestinationMetaDataIds
Returns the collection of integers (metadata IDs) representing which destinations to dispatch the message to.- Returns:
- The collection of integers (metadata IDs) representing which destinations to dispatch the message to.
-
setDestinationMetaDataIds
Sets which destinations to dispatch the message to.- Parameters:
destinationMetaDataIds- A list of integers (metadata IDs) representing which destinations to dispatch the message to.
-
getChannelMap
Deprecated.This method is deprecated and will soon be removed. Please usegetSourceMap()instead.Returns the channel map to be used at the beginning of the channel dispatch.- Returns:
- The channel map to be used at the beginning of the channel dispatch.
-
setChannelMap
Deprecated.This method is deprecated and will soon be removed. Please usesetSourceMap(sourceMap)instead.Sets the channel map to be used at the beginning of the channel dispatch.- Parameters:
channelMap- Any values placed in this map will be populated in the channel map at the beginning of the message's lifecycle.
-
getSourceMap
Returns the source map to be used at the beginning of the channel dispatch.- Returns:
- The source map to be used at the beginning of the channel dispatch.
-
setSourceMap
Sets the source map to be used at the beginning of the channel dispatch.- Parameters:
sourceMap- Any values placed in this map will be populated in the source map at the beginning of the message's lifecycle.
-
isBinary
Returns a Boolean representing whether this object contains textual or binary data.- Returns:
- A Boolean representing whether this object contains textual or binary data.
-
clearMessage
public void clearMessage()Removes references to any data (textual or binary) currently stored by the raw message.
-