Adobe COLDFUSION 9 Manual page 1270

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
Identifier
Structure
Session ID
gatewayType_gatewayID_originatorID
cfid
originatorID
cftoken
gatewayType_gatewayID
The gatewayID value is the event gateway ID that you set in the ColdFusion Administrator, and gatewayType and
originatorID are the values that the event gateway sets in the CFEvent instance for an incoming message.
Application scope
The Application scope lets the CFC share data with any ColdFusion page or CFC that uses the same application name.
This way, a listener CFC can use the same Application scope as CFML pages that send messages. Also, you can place
multiple listener CFCs in a single directory and have them share an Application.cfc or Application.cfm file and
application name.
As with all ColdFusion code, use the Application.cfc This.name variable or the
application name. The listener CFC can use an Application.cfc or Application.cfm file if the CFC is in a directory that
is in or under one of the following places:
• the ColdFusion web root
• a directory that is in the ColdFusion Administrator Mappings list.
The ColdFusion installer creates a mapping in the ColdFusion Administrator for the gateway\cfc directory.
Client scope
The Client scope can store long-term information associated with the ID of the message sender. For example, it can
store information about an IM buddy.
To use Client variables across multiple connections, your gateway type must use the same client ID for all interactions
with a particular client. For many technologies and gateways, such as the IM and SMS gateways, this requirement is
not an issue.
Note: To use Client scope variables with gateways, you must store the Client scope variables in a data source or the
registry. You cannot store the variables in cookies, because gateways do not use cookies.
Session scope
The Session scope can store information required across multiple interactions. For example, an interactive IM or SMS
application that uses a drill-down menu to select a service can store the information about the menu selections in the
Session scope.
Event gateway sessions terminate when they time out. Because the identifiers for event sessions and clients differ from
request-driven session and client identifiers, you cannot use the same Session or Client scope on a standard CFM page
that sends an outgoing message and in a listener CFC that handles an incoming response to that message.
For an example of using the Session scope, see the example Menu application in the gateway\cfc\examples\menu
directory.
Note: ColdFusion cannot create a session if an initiator application uses a
interaction with a client, such as an SMS user. In this case, the sending code must keep track (for example, in a database)
of the messages it sends and their destinations. When a response event arrives, it can look up the originatorID to
determine whether it was in response to an outgoing message.
SendGatewayMessage
Last updated 8/5/2010
tag to set the
cfapplication
method to start an
1265

Advertisement

Table of Contents
loading

Table of Contents