User Guide

Table Of Contents
Event gateway elements 1091
Gateway development classes
ColdFusion provides two classes that you can use as building blocks to develop your event
gateway classes. Each corresponds to a different development methodology:
The coldfusion.eventgateway.GenericGateway class is an abstract class from which you can
derive your gateway class.
The EmptyGateway class in the gateway\src\examples directory is a template gateway that you
can complete to create your gateway class.
The GenericGateway class
ColdFusion MX includes a coldfusion.eventgateway.GenericGateway abstract class that
implements many of the methods of ColdFusion Gateway interface and provides some
convenience methods for use in your gateway class.
You can derive your gateway class from this class, which handles the basic mechanics of
implementing a gateway, such as the
getGatewayID and SetCFCListeners methods. Your
derived class must implement at least the following methods:
startGateway (not start)
stopGateway (not stop)
outgoingMessage
Your derived gateway class also must implement the following:
If you support a configuration file, a constructor that takes a configuration file, and
configuration loading routines.
If you use a gatewayHelper class, the getHelper method.
If the event source status can change asynchronously from the gateway, the getStatus
method.
The example JMS gateway is derived from the generic gateway class. The gateway class JavaDocs
in the gateway\docs directory provide documentation for this class. (The CFML Reference does
not document this class.)
The EmptyGateway class
The gateway\src\examples\EmptyGateway.java file contains an event gateway template that you
can use as a skeleton for creating your own event gateway. (The gateway directory is in the cf_root
directory in the server configuration and the cf_root\WEB-INF-cfusion directory on J2EE
configurations.) This file contains minimal versions of all methods in the
coldfusion.eventgateway.Gateway interface. It defines a skeleton listener thread and initializes
commonly used Gateway properties. The EmptyGateway source code includes comments that
describe the additional information that you must provide to complete an event gateway class.