ColdFusion application developers write applications that use event gateways. The person or company that provides the event gateway supplies gateway-specific information to the ColdFusion developer. This information must include the structure and contents of the messages that the ColdFusion application receives and sends to the event gateway, plus any information about configuration files or helper methods that the ColdFusion application might use.
The ColdFusion developer writes a CFC that listens for messages. Many event gateway types send messages to a listener CFC method named onIncomingMessage
. A minimal event gateway application might implement only this single method. More complex event gateway types can require multiple CFC listener methods. For example, the ColdFusion XMPP IM event gateway sends user messages to the onIncomingMessage
CFC method, but sends requests to add buddies to the onAddBuddyRequest
CFC method.
Depending on the event gateway and application types, the event gateway application might include CFM pages or CFC methods to initiate outgoing messages. The application also might use an event gateway-specific GatewayHelper object to do tasks such as getting buddy lists in IM applications or getting a messaging server's status.
The ColdFusion application developer also configures an event gateway instance in the ColdFusion MX Administrator, and possibly in a configuration file. The ColdFusion MX Administrator configuration information specifies the listener CFC that handles the messages from the event gateway and other standard event gateway configuration details. The configuration file, if required, contains event gateway type-specific configuration information.