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

setGatewayType

Last update:
May 18, 2026

Description

Identifies the type of event gateway.

Category

Event Gateway Development

Syntax

void setGatewayType(String gatewayType)

See also

getGatewayType CFML CFEvent structure CFEvent class  in Developing ColdFusion Applications

Parameters

ParameterDescription
gatewayType
A gateway type identifier.

Usage

For the sake of consistency, use the same name in this method and in the Type Name field when you add the event gateway type in the ColdFusion Administrator. Gateway application CFCs that handle multiple gateway types, such as those in an instant messaging application that handles multiple instant messaging providers, could use this field to determine the protocol type and any gateway type-specific actions.

Example

The following code shows the routine from the example JMS gateway that handles incoming messages. It sets the gateway type to JMS:
public void handleMessage(String msg, String topicName, String msgID) { coldfusion.eventgateway.Logger log = getGatewayServices().getLogger(); Map data = new HashMap(); CFEvent cfMsg = new CFEvent(getGatewayID()); data.put("msg", msg); data.put("id", msgID); cfMsg.setData(data); cfMsg.setOriginatorID(topicName); cfMsg.setGatewayType("JMS"); if (sendMessage(cfMsg)) { log.info("Added message '" + msgID + "' to queue."); } else { log.error("Failed to add message '" + msgID + "' to queue."); } }

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