Adobe COLDFUSION 9 Manual page 1327

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
GatewayServices class
The Gateway class uses the coldfusion.eventgateway.GatewayServices class to interact with the ColdFusion event
gateway services. This class has the following methods:
Signature
GatewayServices
getGatewayServices
addEventmsg
boolean
)
int
getQueueSize
getMaxQueueSize
int
Logger
getLogger
getLogger
Logger
logfile)
CFEvent class
The Gateway class sends and receives CFEvent instances to communicate with the ColdFusion listener CFC or
application. The Gateway notifies ColdFusion of a message by sending a CFEvent instance in a
GatewayServices.addEvent
gateway
outgoingMessage
The CFEvent class extends the java.util.Hashtable class and has the following methods to construct the instance and
set and get its fields. (In CFML, you treat CFEvent instances as structures.)
Methods
CFEvent
gatewayID)
setGatewayType
void
type)
getGatewayType
String
void
setData
data)
Map
getData
void
setOriginatorID
id)
String
getOriginatorID
setCFCPath
void
path)
getCFCPath
String
Description
Static method that returns the GatewayServices object. Gateway code can call
this method at any time, if necessary.
Sends a
event gateway uses this method to send all incoming messages to the
application for processing. Returns False if the event is not added to the queue.
Returns the current size of the ColdFusion event queue. This queue handles all
messages for all gateways.
Returns the maximum size of the ColdFusion event queue, as set in the
ColdFusion Administrator.
Returns a ColdFusion Logger object that the event gateway can use to log
information in the eventgateway.log log file (the default) or the specified log file.
The logfile attribute must be a filename without a filename extension, such as
mylogifile. ColdFusion places the file in the ColdFusion logs directory and
appends .log to the specified filename.
For information on using the logger object, see
files" on page 1332.
method. Similarly, the Gateway receives a CFEvent instance when ColdFusion calls the
method.
Description
CFEvent constructor. The gatewayID parameter must be the value that is passed
in the gateway constructor or set using the Gateway
Identifies the type of event gateway, such as SMS. For the sake of consistency,
use this name in the Type Name field when you add an event gateway type on
the Gateway Types page in the ColdFusion Administrator.
The event data; includes the message being passed to or from ColdFusion. The
content of the field depends on the event gateway type. The Map keys must be
strings.
Because ColdFusion is not case sensitive, it converts the Map passed in the
setData
the data with names that differ only in case.
Identifies the originator of an incoming message or the destination of an
outgoing message. The value depends on the protocol or event gateway type.
An absolute path to the application listener CFC that processes the event. By
default, ColdFusion uses the first path configured for the event gateway
instance on the Event Gateways page in the ColdFusion Administrator.
Last updated 8/5/2010
instance to ColdFusion for dispatching to a listener CFC. The
CFEvent
method to a case-insensitive Map. As a result, do not create entries in
"Logging events and using log
setGatewayID
method.
1322

Advertisement

Table of Contents
loading

Table of Contents