MACROMEDIA COLFUSION MX 7-CFML Reference page 984

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

CFEvent
Description
CFEvent constructor.
Category
Event Gateway Development
Syntax
CFEvent(String gatewayID)
See also
,
getGatewayID
"Creating Custom Event Gateways" in ColdFusion MX Developer's Guide
Parameters
Parameter
gatewayID
Usage
This method creates a container for an event gateway message that you send to ColdFusion MX
gateway services in a
method.
Example
The following example, based on code for the ColdFusion asynchronous CFML gateway, sends a
message to that the gateway has received to a CFC:
public String outgoingMessage(coldfusion.eventgateway.CFEvent cfmsg)
{
// Get the data
Map data = cfmsg.getData();
boolean status = true;
if (data != null)
{
// create an event
CFEvent event = new coldfusion.eventgateway.CFEvent(gatewayID);
//set the event field values
event.setGatewayType("CFMLGateway");
event.setOriginatorID("CFMLGateway");
event.setData(data);
// send it to the event service
status = gatewayService.addEvent(event);
}
return new Boolean(status).ToString();
}
984
Chapter 6: ColdFusion MX Event Gateway Reference
"CFML CFEvent structure" on page
Description
The ID of the gateway. This parameter indicates the source of the message and
must be the value that is passed in the Gateway constructor or set using the
Gateway
setGatewayID
gatewayServices.addEvent
1004, "CFEvent class" in Chapter 45,
method.
method for delivery to a CFC listener

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents