Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 1326

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
Event gateway elements
You use the following the elements to create and configure a gateway:
"Gateway
interface" on page 1321
"GatewayServices
class" on page 1322
"CFEvent
class" on page 1322
"GatewayHelper
class" on page 1323
"Gateway configuration
file" on page 1324
"Gateway development
classes" on page 1324
Note: The gateway interfaces and classes, except for the GenericGateway class, are fully documented in Gateway
development interfaces and classes in the CFML Reference. All interfaces and classes in this list, including the
GenericGateway class, are documented in less detail in the JavaDocs located in the ColdFusion gateways\docs directory.
The JavaDocs documentation lacks examples and does not have the detailed usage information that you find in the CFML
Reference.
Gateway interface
The ColdFusion event gateway must implement the coldfusion.eventservice.Gateway interface. The following table
lists the interface method signatures:
Note: For detailed information on implementing each method, see
reference pages for these methods, see Gateway interface in the CFML Reference.
Signature
void setGatewayID(String id)
void setCFCListeners(String[]
GatewayHelper getHelper()
String getGatewayID()
int getStatus()
void start()
void stop()
void restart()
String outgoingMessage (coldfusion.
cfmessage
eventgateway.CFEvent
Description
Sets the gateway ID that uniquely identifies the gateway instance. ColdFusion
calls this method before it starts the event gateway, even if the gateway class
constructor also sets the ID.
listeners
Identifies the CFCs that listen for incoming messages from the event gateway.
)
The array contains one or more paths to the listener CFCs. ColdFusion calls this
method before it starts the event gateway, and if the configuration for a running
event gateway changes.
Returns a coldfusion.eventgateway.GatewayHelper class instance, or null. The
GatewayHelper class provides event gateway-specific utility methods to CFML
applications. ColdFusion calls this method when a ColdFusion application calls
the
GetGatewayHelper
Returns the gateway ID.
Gets the event gateway status. The interface defines the following status
constants:
STARTING
Starts the event gateway. Starts at least one thread for processing incoming
messages. ColdFusion calls this method when it starts an event gateway.
Stops the event gateway. Stops the threads and destroys any resources.
ColdFusion calls this method when it stops an event gateway.
Restarts a running event gateway. ColdFusion calls this method when the
ColdFusion Administrator restarts a running event gateway.
Handles a message sent by ColdFusion and processes it as needed by the
gateway type to send a message. ColdFusion calls this method when the listener
)
method of a listener CFC returns a CFEvent or when a ColdFusion application
calls the
SendGatewayMessage
function gets the returned String as its return value.
Last updated 1/20/2012
"Building an event
gateway" on page 1325. For
function.
,
,
,
RUNNING
STOPPING
STOPPED
function. The CFML
1321
,
.
FAILED
SendGatewayMessage

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents