About ColdFusion and instant messages

ColdFusion includes two instant messaging gateway types: one for messaging using the XMPP protocol, and one for IBM Lotus Instant Messaging (Sametime). These gateway types use identical interfaces for sending and receiving messages and for managing the IM presence information and infrastructure. This chapter, therefore, refers to IM gateways, and only describes the two types where there are differences.

The ColdFusion IM gateways act as IM clients and let you do the following:

This section describes the following topics:

About XMPP

XMPP (Extensible Messaging and Presence Protocol) is an open, XML-based protocol for instant messaging. It is the core protocol of the Jabber Instant Messaging and Presence technology that is developed by the Jabber Software Foundation. As of November 2004, XMPP was defined by four Internet Engineering Task Force (IETF) specifications (RFCs), numbers 3920-3922. RFC 3920 covers the XMPP core, and 3921, covers instant messaging and presence. Numerous XMPP servers and clients are available. ColdFusion MX supports the IETF XMPP protocol.

The following websites provide additional information about the XMPP protocol:

About IBM Lotus Instant Messaging (Sametime)

IBM Lotus Instant Messaging, commonly referred to as Lotus Sametime, is the IBM product for real-time collaboration. For more information about this product, see www.lotus.com/sametime.

About IM application development and deployment

The following sections introduce the ColdFusion IM application development tools and process, and discuss IM messaging providers.

ColdFusion MX IM gateway classes

ColdFusion provides the following instant messaging gateway classes:

XMPPGateway The class for the XMPP event gateway type

SAMETIMEGateway The class for the IBM Lotus Instant Messaging event gateway

You implement your IM application by configuring a gateway instance in ColdFusion MX Administrator that uses one of these gateway classes and creating a ColdFusion application that uses the gateway instance to communicate with an instant messaging server.

Application development and deployment process

The following is a typical process for developing and deploying an IM application:

  1. Design your application.
  2. Configure an IM event gateway instance to use an available XMPP or Lotus Sametime server.
  3. Write your CFCs, CFM pages, and any other application elements.
  4. Test your application using your XMPP or Lotus Sametime server and an appropriate client application.
  5. Deploy the application, as described in Deploying event gateways and applications.

How the IM event gateway and provider interact

Each IM event gateway instance has a single instant messaging ID. You must establish the ID and its related password on the IM server using server-specific tools, such as a standard instant messaging client. In ColdFusion MX, you set the ID, password, and other gateway-specific information in a gateway configuration file, and you create a gateway instance that uses this file.

When you start the gateway, it logs onto the IM server with the ID and password, and receives and sends the messages for the ID. The gateway sends incoming messages to a CFC, which you specify when you configure the gateway instance in the ColdFusion MX Administrator. The gateway passes outgoing messages from this CFC and from other CFML code to the IM server.

The IM event gateway also provides a number of helper methods for managing the gateway and its configuration information.