22.08.2013 Views

ColdFusion Developer's Guide

ColdFusion Developer's Guide

ColdFusion Developer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta<br />

Incoming message handling<br />

You write the following <strong>ColdFusion</strong> CFC methods to handle incoming messages and requests<br />

from the IM event gateway. These CFCs receive messages from the IM server and can respond<br />

to them by setting a return value.<br />

CFC method Message type<br />

onIncomingMessage Standard message from IM users.<br />

onAddBuddyRequest Requests from others to add the gateway ID to their buddy list.<br />

onAddBuddyResponse Responses from others to requests from your gateway to add them<br />

to your buddy lists. Also used by buddies to ask to be removed from<br />

your list.<br />

onBuddyStatus Presence status messages from other users.<br />

onIMServerMessage Error and status messages from the IM server.<br />

For more information on these methods, see “Handling incoming messages” on page 1539.<br />

Outgoing message handling<br />

Applications send outgoing instant messages using the CFML SendGatewayMessage method.<br />

Incoming message-handling CFC methods can also send messages, including responses to<br />

requests from others to add the <strong>ColdFusion</strong> gateway’s ID to their buddy list. For more<br />

information on sending messages, see “Sending outgoing messages” on page 1540.<br />

IMGatewayHelper methods<br />

The <strong>ColdFusion</strong> IM gateway provides the IMGatewayHelper class, a gateway helper that you<br />

can access by calling the CFML GetGatewayHelper function. The IMGatewayHelper class<br />

has methods that let you do the following:<br />

■ Get and set gateway configuration information and get gateway statistics<br />

■ Get and set the gateway online presence status<br />

■ Manage the gateway’s buddy list<br />

■ Manage permissions for others to get information about the gateway status.<br />

For more information on using GatewayHelper methods, including lists of all the methods,<br />

see “Using the GatewayHelper object” on page 1547.<br />

1536 Using the Instant Messaging Event Gateways

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!