User Guide

Table Of Contents
Event gateway elements 1089
GatewayHelper class
ColdFusion MX includes a coldfusion.eventgateway.GatewayHelper Java marker interface. You
implement this interface to define a class that provides gateway-specific utility methods to the
ColdFusion application or listener CFC. For example, an instant messaging event gateway might
use a helper class to provide buddy list management methods to the application.
The Gateway class must implement a
getHelper method that returns the helper class or null (if
the gateway does not need such a class).
ColdFusion applications call the
GetGatewayHelper CFML function, which invokes gateways
the
getHelper method to get an instance of the helper class. The application can then call helper
class methods using ColdFusion object dot notation.
void setData(Map data)
Map getData()
The event data; includes the message being passed to or
from ColdFusion. The content of the field depends 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.
void setOriginatorID(String id)
String getOriginatorID()
Identifies the originator of an incoming message or the
destination of an outgoing message. The value depends
on the protocol or event gateway type.
void setCFCPath(String path)
String getCFCPath()
An absolute path to the application listener CFC that will
process the event. By default, ColdFusion uses the first
path configured for the event gateway instance on the
Event Gateways page in the ColdFusion MX
Administrator.
void setCFCMethod(String method)
String getCFCMethod()
The method in the listener CFC that ColdFusion calls to
process this event. By default, ColdFusion invokes the
onIncomingMessage method. For the sake of consistency,
Macromedia recommends that any event gateway with a
single listener not override this default. A gateway, such as
the ColdFusion MX XMPP gateway, that uses different
listener methods for different message types, uses this
method to identify the destination method..
void setCFCTimeout(String seconds)
String getCFCTimeout()
The time-out, in seconds, for the listener CFC to process
the event request. When ColdFusion calls the listener
CFC to process the event, and the CFC does not process
the event in the specified time-out period, ColdFusion
terminates the request and logs an error in the
application.log file. By default, ColdFusion uses the
Timeout Request value set on the Server Settings page in
the ColdFusion MX Administrator.
String getGatewayID()
The event gateway instance that processes the event.
Returns the gateway ID that was set in the CFEvent
constructor.
Methods Description