Sets the array of listener CFCs that the gateway sends messages to.
Event Gateway Development
public void setCFCListeners(String[] listeners)
Constructor
, getGatewayID
, setCFCPath
, Providing Gateway class service and information routines in Creating Custom Event Gateways in ColdFusion MX Developer's Guide
Parameter | Description |
---|---|
listeners |
Array of absolute file paths to CFCs to which the gateway forwards messages when it gets events. |
When ColdFusion MX starts a gateway instance, it calls this method with the names in the instance's listener list in the ColdFusion MX Administrator. ColdFusion MX can also call this method if the ColdFusion MX Administrator listener list changes while the gateway is running.
The following example is the ColdFusion MX 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; } }