MACROMEDIA COLFUSION MX 7-CFML Reference page 992

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

setCFCMethod
Description
Sets the name of the CFC method that will processes an incoming message.
Category
Event Gateway Development
Syntax
void setCFCMethod(String method)
See also
,
getCFCMethod
"CFEvent class" in Chapter 45, "Creating Custom Event Gateways" in ColdFusion MX Developer's
Guide
Parameters
Parameter
method
Usage
Gateways that use a single CFC listener method do not need to use this method if the listener
CFC method is named
recommends that any event gateway with a single listener not override this default.
A gateway, such as the ColdFusion MX XMPP gateway, that uses different listener methods for
different message types uses this method to identify the destination method.
Example
The following example code comes from the ColdFusion XMPP gateway incoming message
handler. It creates a CFEvent object and sets the method that will handle tests based on the
message type.
CFEvent cfmsg = new CFEvent(gatewayID);
cfmsg.setOriginatorID(sender);
cfmsg.setGatewayType(gatewayType);
if(messageType == IMessage.IM)
{
// default for normal messages
cfmsg.setCfcMethod(onIncomingMessageFunction);
}
//if the message is an authorization request
else if(messageType == IMessage.AUTH_REQUEST)
{
cfmsg.setCfcMethod(onAddBuddyRequestFunction);
message = "Requesting authorization to add '" + recipient + "' to '"
+ sender + "' buddy list and view '" + recipient + "' presence.";
} // Code snipped here for brevity.
992
Chapter 6: ColdFusion MX Event Gateway Reference
,
setCFCPath
setCFCTimeout
Description
The method in the listener CFC that ColdFusion will call to process this event. If you
do not use this method in your gateway, ColdFusion invokes the
method,
onIncomingMessage
onIncomingMessage
,
"CFML CFEvent structure" on page
. For the sake of consistency, Macromedia
1004,

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents