User Guide

Table Of Contents
1028 Chapter 42: Using Event Gateways
The role of the ColdFusion MX Administrator
The Gateways page in the ColdFusion MX Administrator associates a specific event gateway
instance with one or more listener CFCs that processes messages from the event gateway. It tells
the ColdFusion event gateway service to send messages received by the event gateway to the
listener CFC. It also lets you specify a configuration file for the event gateway instance and
whether to start the event gateway instance (and therefore any responder application) when
ColdFusion starts. For more information on using the Administrator, see “ColdFusion MX
Administrator event gateway pages” on page 1026 and the ColdFusion MX Administrator
online Help.
The role of the GatewayHelper object
A ColdFusion MX event gateway provides an information conduit: at its most basic, it receives
and dispatches event messages. In some cases, however, an event gateway must provide additional
functionality. An instant messaging event gateway, for example, needs to provide such services as
managing buddies and providing status information. To support such use, an event gateway can
enable access to a GatewayHelper object. The event gateway developer writes a Java class that
provides the necessary utility routines as Java methods, and ColdFusion MX application
developers can get an instance of the class by calling the CFML
GetGatewayHelper method. The
application calls the GatewayHelper object’s methods using normal ColdFusion MX object access
techniques. The ColdFusion MX instant messaging event gateways and the example socket event
gateway provide GatewayHelper objects.
Configuring an event gateway instance
Before you develop or deploy an event gateway application, you must use the ColdFusion MX
Administrator to configure an event gateway instance that will handle the event messages. You
specify the following information:
An event gateway ID to identify the specific event gateway instance. You use this value in the
CFML
GetGatewayHelper and SendGatewayMessage functions.
The event gateway type, which you select from the available event gateway types, such as SMS
or Socket.
The absolute path to the listener CFC or CFCs that will handle incoming messages. If you
have multiple listener CFCs, enter the paths separated by commas. You must specify absolute
file paths, even if you put the CFCs in the ColdFusion MX gateway\cfc directory.
A configuration file, if required for this event gateway type or instance.
The event gateway start-up status; one of the following:
Automatic Start the event gateway when ColdFusion starts.
Manual Do not start the event gateway with ColdFusion, but allow starting it from the
ColdFusion MX Administrator Event Gateways list.
Disabled Do not allow the event gateway to start.