User Guide

Table Of Contents
1085
CHAPTER 45
Creating Custom Event Gateways
This chapter describes how to create event gateways. It assumes you have a thorough knowledge
of Java programming, including Java event-handling and thread-handling concepts, and of the
technology to which you are providing the gateway, including the types of messages that you will
handle. It also assumes that you have a thorough knowledge of Macromedia ColdFusion
development concepts and practices, including ColdFusion components (CFCs).
Note: ColdFusion MX Standard Edition does not support event gateways.
Contents
Event gateway architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1085
Event gateway elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1086
Building an event gateway . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1092
Deploying an event gateway. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1100
Event gateway architecture
A ColdFusion event gateway listens for events and passes them to ColdFusion for handling by the
applications listener CFC or CFCs. It must implement the coldfusion.eventgateway.Gateway
interface, and use the ColdFusion GatewayServices class. The following figure expands on the
basic event handling architecture diagram to show how a ColdFusion event gateway works:
Receiving messages The event gateway listener thread receives events from an external event
source such as a socket or SMSC server, and calls the GatewayServices
addEvent method to send
a
CFEvent instance to ColdFusion.
Listener thread
addEvent
method
External event
generator/receiver
External event
generator/receiver
outgoingMessage
method
Event Gateway
ColdFusion
Event
Gateway
Services
Event Gateway
Event
Event
Event
Event
CFEvent
CFEvent
CFEvent
CFEvent
Application
Listener CFC
CFEvent
Message
Listener CFC
CFEvent
Message
CFEvent
Message
CFC
CFML Page
.
.
.
.
.
.
.
.
.