Description
Adds the gateway-specific data, including any message contents, as a Java Map to the CFEvent object
Category
Event Gateway Development
Syntax
void setData(Map data) |
See also
getData, CFML CFEvent structure, CFEvent class in the Developing ColdFusion Applications
Parameters
Parameter |
Description |
---|---|
data |
The incoming message and any additional gateway-specific event data. |
Usage
The number of fields and their contents depend on the event gateway type. The Map keys must be strings. Because ColdFusion is not case sensitive, it converts the Map passed in the setData method to a case insensitive Map. As a result, do not create entries in the data with names that differ only in case.
Example
The following code shows the routine from the example JMS gateway that handles incoming messages. It puts the JMS message ID and contents in a data HashMap, and uses it in the setData method:
public void handleMessage(String msg, String topicName, String msgID) { |