Adobe COLDFUSION 9 Manual page 1285

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
Property
Default value
retries
-1
retryinterval
5
onIncomingMessageFu
onIncomingMessage
nction
onAddBuddyRequestFu
onAddBuddyRequest
nction
onAddBuddyResponseF
onAddBuddyResponse
unction
onBuddyStatusFunction onBuddyStatus
onIMServerMessageFun
onIMServerMessage
ction
Note: If you do not have a CFC method to handle any of the event types, specify the corresponding property without a
value. Use the following entry in the configuration file, for example, if you do not have a method to handle
IMServerMessage events: onIMServerMessageFunction=
Handling incoming messages
The IM event gateway handles five types of messages, and your CFC must implement a listener method for each
message type. The following table describes the message-handling CFC methods and the messages they handle. It lists
the default CFC method names; however, you can change the names in the gateway configuration file.
CFC method
onIncomingMessage
onAddBuddyRequest
Description
Integer number of times to retry connecting to the IM server on gateway startup or if the
Gateway gets disconnected.
0 = do not to retry
-1 = try forever
Real number of seconds to wait between connection attempts. The minimum is 1
second.
Name of CFC method to call to handle an incoming message. If you specify the property
without a value, such as "onIncomingMessageFunction=", the gateway does not send
this event to a CFC.
Name of CFC method to call to handle an incoming buddy request. If you specify the
property without a value, the gateway does not send this event to a CFC.
Name of CFC method to call to handle an incoming response to a buddy request sent by
ColdFusion. If you specify the property without a value, the gateway does not send this
event to a CFC.
Name of CFC method to call to handle an incoming buddy status message, such as If you
specify the property without a value, the gateway does not send this event to a CFC.
Name of CFC method to call to handle an incoming message method. If you specify the
property without a value, the gateway does not send this event to a CFC.
Description
Standard message from an IM user. The application processes the message body appropriately; for
example, it could display the message in an interface window.
This method can return a response message to the sender.
Request from another IM user to add your application's IM ID to their buddy list. The CFC must
determine whether to accept or reject the request, or to take no action. An action is not always
appropriate in cases where the request must be reviewed offline for approval and responses are
sent at a later time.
The CFC returns a message with the decision as a command value and optionally a text message
specifying the reason. If you accept the request, the requestor automatically gets added to the list
of IDs that can get status information for the gateway. If you specify no action, ColdFusion does not
respond.
Last updated 8/5/2010
1280

Advertisement

Table of Contents
loading

Table of Contents