Adobe COLDFUSION 9 Manual page 1267

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
Configuring an event gateway instance
Before you develop or deploy an event gateway application, use the ColdFusion Administrator to configure an event
gateway instance that handles 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
and
GetGatewayHelper
• 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 handles incoming messages. If you have multiple listener CFCs,
enter the paths separated by commas. Specify absolute file paths, even if you place the CFCs in the ColdFusion
gateway\cfc directory.
• A configuration file, if necessary for this event gateway type or instance.
• The event gateway start-up status; one of the following:
Start the event gateway when ColdFusion starts.
Automatic
Do not start the event gateway with ColdFusion, but allow starting it from the ColdFusion Administrator
Manual
Event Gateways list.
Do not allow the event gateway to start.
Disabled
Developing an event gateway application
All event gateway applications handle information. They exchange event messages, and possibly other types of
information, with other resources. Event gateway applications require a listener CFC to handle events that are sent to
the event gateway. Event gateway applications can also use the following code elements:
CFML functions to send messages from outside the listener CFC (or, optionally, from the CFC)
SendGatewayMessage
• GatewayHelper objects
• The eventgateway log file
Event gateway application models
Event gateway applications follow one or both of the following models:
Where event messages from external sources initiate a response from a ColdFusion listener CFC
Responder applications
Where a ColdFusion application generates event messages to send out using the event gateway
Initiator applications
Unlike other ColdFusion applications, responder applications are request-free. They do not have CFM pages, just
CFCs, and they do not respond to HTTP requests. Instead, ColdFusion the event gateway service deliver the event
messages directly to the listener CFC, and the CFC listener method returns any response directly to the event gateway
service. Applications that allow mobile phone owners to get a news feed, check for text messages, or request other
forms of information follow this model.
Initiator applications are like most ColdFusion applications. At some point, ColdFusion executes a CFM page in
response to a request. (The ColdFusion Administrator Scheduled Tasks page can initiate the request.) ColdFusion
sends a message to the event gateway when the application calls a CFML
application that uses SMS to notify customers when orders have been shipped follows this model.
Sending information to the event gateway
A ColdFusion application can send an outgoing message to the event gateway in either of the following ways:
• In a
tag in the listener CFC listener method
cfreturn
functions.
SendGatewayMessage
Last updated 8/5/2010
function. An
SendGatewayMessage
1262

Advertisement

Table of Contents
loading

Table of Contents