Adobe COLDFUSION 9 Manual page 1335

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
3
Call the CFEvent
setOriginator
ColdFusion application sends a response.)
Call the CFEvent
4
setGateWayType
Set any other CFEvent fields where the default behavior is not appropriate; for example, call the
5
method to replace the default listener CFC. (For information on default CFEvent fields, see
page 1322.)
Call the
6
gatewayService.addEvent
7
Handle cases where the event is not added to the event gateway service queue (the
If your application sends any messages to multiple listener CFCs, the gateway must create and configure a CFEvent
instance and call the
gatewayService.addEvent
method of the gateway must make the CFC paths available to the gateway for configuring the
setCFCListeners
CFEvent instances.
If your ColdFusion server carries a heavy event gateway message load, the ColdFusion event gateway services event
queue could reach the maximum value set in the ColdFusion Administrator. When the queue reaches the maximum,
the
gatewayService.addEvent
• Return a message to the sender to indicate that their message was not received.
• Wait until the queue is available by periodically comparing the values returned by the GatewayService
and
getQueueSize
getMaxQueueSize
the maximum.
• Log the occurrence using the logger returned by the GatewayService
see
"Logging events and using log
The SocketGateway class implements the listener using a java.net.ServerSocket class object and SocketServerThread
listener threads. (See the SocketGateway source for the SocketServerThread code.) When the listener thread gets a
message from the TCP/IP socket, it calls the following
This method explicitly sets all required and optional CFEvent fields and sends the event to ColdFusion. If the
call fails, it logs the error.
addEvent
Note: Much of the
processInput
CFC, would require only the code in the latter part of this method.
method to specify the source of the message. (This call is required if the
method to specify the event gateway type.
method to dispatch the CFEvent instance to ColdFusion.
method to send the message to each separate listener CFC. The
method returns False and fails. Your code can do any of the following:
methods, and retry the
files" on page 1332.)
processInput
method code supports multiple listener CFCs. A gateway that uses only a single listener
Last updated 8/5/2010
addEvent
method when the queue size is less than
addEvent
method. (For more information,
getLogger
method to dispatch the message to ColdFusion.
1330
setCFCPath
"CFEvent
class" on
method returns False).

Advertisement

Table of Contents
loading

Table of Contents