Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 1286

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
CFC method
onAddBuddyResponse
onBuddyStatus
onIMServerMessage
For detailed information on each method, including examples of their use, see IM Gateway CFC incoming message
methods in the CFML Reference. For an example that uses these functions, see
application" on page 1282.
Sending outgoing messages
You use the
SendGatewayMessage
messages. The ColdFusion IM gateway accepts the following outgoing message commands:
Command
Description
submit
(Default) Sends a normal message to another IM user.
accept
Accepts an add buddy request. Adds the buddy to the list of IDs that get your presence information and sends an
acceptance message to the buddy ID.
decline
Declines an add buddy request and sends a rejection message to the buddy ID.
noact
Tells the gateway to take no action. The gateway logs a message that indicates that it took no action, and contains the
gateway type, gateway ID, and buddy ID.
The message structure that you return in the gateway listener CFC function or use as the second parameter in the
CFML
SendGatewayMessage
which they are used, and describes each field's use.
Field
Commands
buddyID
All
command
All
message
submit
reason
accept, decline
In typical use, a ColdFusion application uses the accept, decline, and noact commands in the return value of the
method, and uses the submit command (or no command, because submit is the default
onAddBuddyRequest
command) in
SendGatewayMessage
Description
Response from another IM user to a request from the gatewaybeing added to their buddy list. The
response message is accept or decline.
Your application can handle this response as appropriate; for example, to add or remove the ID
from a list of message recipients.
This method does not return a value.
Message indicating a gateway buddy's status. Received when a buddy's status changes; for
example, from OFFLINE to ONLINE.
This method does not return a value.
Status messages from the IM server, such as warning or error messages. The messages you can
receive depend on the IM server that sends them. For information on the server messages, see the
documentation for the IM server that your gateway instance uses.
This method does not return a value.
CFML function or the return value of a CFC listener method to send outgoing
function can have the following fields. The table lists the fields and the commands in
Description
The destination user ID.
The command; if omitted, ColdFusion treats the message as a submit command.
A text message to send to the destination user.
A text description of the reason for the action or other message to send to the add buddy
requestor.
CFML functions and the return value of the
Last updated 1/20/2012
"Sample IM message handling
CFC method.
onIncomingMessage
1281

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents