The Gateway class sends and receives CFEvent instances to communicate with the ColdFusion listener CFC or application. The Gateway notifies ColdFusion of a message by sending a CFEvent instance in a GatewayServices.addEvent
method. Similarly, the Gateway receives a CFEvent instance when ColdFusion calls the gateway's outgoingMessage
method.
The CFEvent class extends the java.util.Hashtable class and has the following methods to construct the instance and set and get its fields. (In CFML, you treat CFEvent instances as structures.)
Methods | Description |
---|---|
|
CFEvent constructor. The gatewayID parameter must be the value that is passed in the gateway constructor or set using the Gateway |
void |
Identifies the type of event gateway, such as SMS. For the sake of consistency, use this name in the Type Name field when you add an event gateway type on the Gateway Types page in the ColdFusion MX Administrator. |
void |
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 |
void |
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 |
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 |
The method in the listener CFC that ColdFusion calls to process this event. By default, ColdFusion invokes the |
void |
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. |
|
The event gateway instance that processes the event. Returns the gateway ID that was set in the CFEvent constructor. |