Whatever message this page gives is out now! Go check it out!

CFEvent

Last update:
May 18, 2026

Description

CFEvent constructor.

Category

Event Gateway Development

Syntax

CFEvent(String gatewayID)

See also

getGatewayID CFML CFEvent structure , CFEvent class in the Developing ColdFusion Applications

Parameters

ParameterDescription
gatewayID
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 method. The SMS gateway ID must be 21 characters or fewer.

Usage

This method creates a container for an event gateway message that you send to ColdFusion gateway services in a gatewayServices.addEvent method for delivery to a CFC listener 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(); }

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page