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

Constructor

Last update:
May 18, 2026

Description

Instantiates a gateway.

Category

Event Gateway Development

Syntax

public void gatewayName() public void gatewayName(String id) public void gatewayName(String id, String configFile)

See also

setGatewayIDClass constructor in  Building an event gateway  in the Developing ColdFusion Applications.

Parameters

ParameterDescription
id
The identifier for the gateway instance
configFile
The absolute path to the gateway configuration file.

Usage

If your gateway requires a configuration file, use the constructor with two parameters. Otherwise, you can use either the default constructor or the single parameter version; ColdFusion always uses the setGatewayID method to set the ID.

Example

The following example shows the two argument constructor implemented in the ColdFusion SocketGateway class:
public SocketGateway(String id, String configpath) { propsFilePath=configpath; try { FileInputStream propsFile = new FileInputStream(propsFilePath); properties.load(propsFile); propsFile.close(); this.loadProperties(); } catch (FileNotFoundException f) { // do nothing. use default value for port. } catch (IOException e) { e.printStackTrace(); } gatewayID = id; gatewayService = GatewayServices.getGatewayServices(); }

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