com.mirth.connect.server.userutil
Class RawMessage

java.lang.Object
  extended by com.mirth.connect.server.userutil.RawMessage

public class RawMessage
extends java.lang.Object

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 channel map.


Constructor Summary
RawMessage(byte[] rawBytes)
          Instantiates a RawMessage object to dispatch to a channel.
RawMessage(byte[] rawBytes, java.util.List<java.lang.Integer> destinationMetaDataIds)
          Instantiates a RawMessage object to dispatch to a channel.
RawMessage(byte[] rawBytes, java.util.List<java.lang.Integer> destinationMetaDataIds, java.util.Map<java.lang.String,java.lang.Object> channelMap)
          Instantiates a RawMessage object to dispatch to a channel.
RawMessage(java.lang.String rawData)
          Instantiates a RawMessage object to dispatch to a channel.
RawMessage(java.lang.String rawData, java.util.List<java.lang.Integer> destinationMetaDataIds)
          Instantiates a RawMessage object to dispatch to a channel.
RawMessage(java.lang.String rawData, java.util.List<java.lang.Integer> destinationMetaDataIds, java.util.Map<java.lang.String,java.lang.Object> channelMap)
          Instantiates a RawMessage object to dispatch to a channel.
 
Method Summary
 void clearMessage()
          Removes references to any data (textual or binary) currently stored by the raw message.
 java.util.Map<java.lang.String,java.lang.Object> getChannelMap()
          Returns the channel map to be used at the beginning of the channel dispatch.
 java.util.List<java.lang.Integer> getDestinationMetaDataIds()
          Returns the list of integers (metadata IDs) representing which destinations to dispatch the message to.
 byte[] getRawBytes()
          Returns the binary data (byte array) to be dispatched to a channel.
 java.lang.String getRawData()
          Returns the textual data to be dispatched to a channel.
 java.lang.Boolean isBinary()
          Returns a Boolean representing whether this object contains textual or binary data.
 void setChannelMap(java.util.Map<java.lang.String,java.lang.Object> channelMap)
          Sets the channel map to be used at the beginning of the channel dispatch.
 void setDestinationMetaDataIds(java.util.List<java.lang.Integer> destinationMetaDataIds)
          Sets which destinations to dispatch the message to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RawMessage

public RawMessage(java.lang.String rawData)
Instantiates a RawMessage object to dispatch to a channel.

Parameters:
rawData - The textual data to dispatch to the channel.

RawMessage

public RawMessage(java.lang.String rawData,
                  java.util.List<java.lang.Integer> destinationMetaDataIds)
Instantiates a RawMessage object to dispatch to a channel.

Parameters:
rawData - The textual data to dispatch to the channel.
destinationMetaDataIds - A list of integers (metadata IDs) representing which destinations to dispatch the message to.

RawMessage

public RawMessage(java.lang.String rawData,
                  java.util.List<java.lang.Integer> destinationMetaDataIds,
                  java.util.Map<java.lang.String,java.lang.Object> channelMap)
Instantiates a RawMessage object to dispatch to a channel.

Parameters:
rawData - The textual data to dispatch to the channel.
destinationMetaDataIds - A list of integers (metadata IDs) representing which destinations to dispatch the message to.
channelMap - Any values placed in this map will be populated in the channel 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

public RawMessage(byte[] rawBytes,
                  java.util.List<java.lang.Integer> destinationMetaDataIds)
Instantiates a RawMessage object to dispatch to a channel.

Parameters:
rawBytes - The binary data (byte array) to dispatch to the channel.
destinationMetaDataIds - A list of integers (metadata IDs) representing which destinations to dispatch the message to.

RawMessage

public RawMessage(byte[] rawBytes,
                  java.util.List<java.lang.Integer> destinationMetaDataIds,
                  java.util.Map<java.lang.String,java.lang.Object> channelMap)
Instantiates a RawMessage object to dispatch to a channel.

Parameters:
rawBytes - The binary data (byte array) to dispatch to the channel.
destinationMetaDataIds - A list of integers (metadata IDs) representing which destinations to dispatch the message to.
channelMap - Any values placed in this map will be populated in the channel map at the beginning of the message's lifecycle.
Method Detail

getRawData

public java.lang.String getRawData()
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.


getDestinationMetaDataIds

public java.util.List<java.lang.Integer> getDestinationMetaDataIds()
Returns the list of integers (metadata IDs) representing which destinations to dispatch the message to.


setDestinationMetaDataIds

public void setDestinationMetaDataIds(java.util.List<java.lang.Integer> destinationMetaDataIds)
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

public java.util.Map<java.lang.String,java.lang.Object> getChannelMap()
Returns the channel map to be used at the beginning of the channel dispatch.


setChannelMap

public void setChannelMap(java.util.Map<java.lang.String,java.lang.Object> channelMap)
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.

isBinary

public java.lang.Boolean isBinary()
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.