Using The Instant Messaging Event Gateways - Adobe 38043740 - ColdFusion Standard - Mac Development Manual

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
• The main.cfc file contains the master CFC; the event gateway configuration in ColdFusion Administrator uses it as
the listener CFC. The main CFC file processes CFEvent structures from the event gateway. It does the following:
Inspects the gatewayType field to determine the rest of the structure contents. This check is necessary because
1
different event gateways place the message in fields with different names.
If a Session.menu variable does not exist, initializes the menu system. To do so, it calls methods in two other
2
CFCs: menu and menunode. These two CFCs contain the menu system code.
Calls the session.menu.process method to process the user input. This method can dispatch a message to an
3
individual application for processing, if appropriate.
• The apps directory contains several CFCs. Each file contains the code for a single application, such as the weather
report or dictionary lookup (definition.cfc).
Use the menu application with the Socket event gateway
On the Gateway Settings page in the ColdFusion Administrator, click the Start SMS Test Server button.
1
On the Gateway Instances page in the ColdFusion Administrator, start the SMS Menu App - 5551212 event gateway
2
by clicking the green play button (third button from the left in the Actions column). If the Status does not say
Running after a few seconds, click Refresh to check that the server started.
3
In the cf_root\WEB-INF\cfusion\bin directory on J2EE configurations or the cf_root\bin directory on server
configurations, run the SMSClient.bat file (on Windows) or SMSClient.sh file (on UNIX or Linux) to start the SMS
phone simulator. The simulator is preconfigured by default to "call" the default SMS event gateway configuration.
4
Enter any character by typing or by using the mouse to click the simulator keypad, and press Enter on your
keyboard or click Send on the simulator.
5
The menu application responds with the top-level menu. Enter L for language tools such as a dictionary and
thesaurus, S to get stock quotes or weather forecasts, or C to get information about the server. Press Enter on your
keyboard or click Send on the simulator.
The application displays a submenu. For example, if you select S in step 5, the options are Q for a stock quote, W
6
for weather, or B to go back to the previous menu. Enter your selection.
The application requests information such as a Zip code for the weather, stock symbol for a price, word for the
7
dictionary, and so on. Enter and send the required information (or enter B to go back to the menu).
The application gets and displays the requested information. Depending on the application, you could also be
8
prompted to enter M to get more. Enter M (if more information is available), another term, or B to return to the
previous menu.
9
Continue by entering menu items and detailed information requests.
To exit, select File > Exit from the menu bar.
10

Using the Instant Messaging Event Gateways

You can develop an application that uses either of two instant message (IM) event gateway types provided with Adobe
ColdFusion: an IBM Lotus Sametime gateway, and an Extensible Messaging and Presence Protocol (XMPP) gateway.
Before you use the IM event gateways, become familiar with ColdFusion event gateway principles and programming
techniques (see
"Using Event
Gateways" on page 1254).
Last updated 1/20/2012
1276

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents