Handles incoming error and status messages from the IM server.
onIMServerMessage(CFEvent)
onIncomingMessage, onAddBuddyRequest, onAddBuddyResponse, onBuddyStatus
This method must take one parameter, a CFEvent structure with the following fields:
| Field | Description |
|---|---|
|
gatewayType |
Gateway type, either XMPP or SAMETIME |
|
gatewayID |
The ID of the gateway instance, as configured in ColdFusion MX Administrator |
|
originatorID |
The IM ID (buddy name) of the message originator |
|
cfcMethod |
This CFC method; by default, onIMServerMessage |
|
data.MESSAGE |
The message sent by the server |
|
data.SENDER |
The sender's ID; identical to the originatorID |
|
data.RECIPIENT |
The recipient's ID, as specified in the gateway's configuration file |
|
data.TIMESTAMP |
The date and time when the message was sent |
The following example logs the sender, message, and a timestamp when an IM server sends an error or status message:
<cffunction name="onIMServerMessage">
<!--- This function just logs the message. --->
<cfargument name="CFEvent" type="struct" required="YES">
<cflog file="#CFEvent.GatewayID#Status"
text="onIMServerMEssage; SENDER: #CFEvent.OriginatorID# MESSAGE:
#CFEvent.Data.MESSAGE# TIMESTAMP: #CFEvent.Data.TIMESTAMP#">
</cffunction>
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | KnowledgeBase | Bug Reporting
Version 7
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/7/htmldocs/00000750.htm