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

setCFCListeners

Last update:
Jun 9, 2026

Description

Sets the array of listener CFCs that the gateway sends messages to.

Category

Event Gateway Development

Syntax

public void setCFCListeners(String[] listeners)

See also

Constructor getGatewayID setCFCPath , Providing Gateway class service and information routines in the Developing ColdFusion Applications

Parameters

ParameterDescription
listeners
Array of absolute file paths to CFCs to which the gateway forwards messages when it gets events.

Usage

When ColdFusion starts a gateway instance, it calls this method with the names in the instances listener list in the ColdFusion Administrator. ColdFusion can also call this method if the ColdFusion Administrator listener list changes while the gateway is running.

Example

The following example is the ColdFusion SocketGateway class setCFCListeners method:
public void setCFCListeners(String[] listeners) { ArrayList aListeners = new ArrayList(); for(int i = 0; i<listeners.length; i++) { aListeners.add(listeners[i]); } // Try not to pull the rug out from underneath a running message synchronized (cfcListeners) { cfcListeners = aListeners; } }

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