Package coldfusion.eventgateway
Class GatewayServices
java.lang.Object
coldfusion.eventgateway.GatewayServices
Functions for use by gateway implementers to interact with the
ColdFusion event gateway service.
Use GatewayServices.getGatewayServices() to get an instance of
this class.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd an event to the ColdFusion event service processing queue for delivery to a listener CFC.static GatewayServicesReturn A GatewayServices object.coldfusion.eventgateway.LoggerGet the default event logging object.coldfusion.eventgateway.LoggerGet a custom event logging object.intReturn the maximum size of the gateway event queue.intReturn the current size of the gateway event queue.
-
Method Details
-
getGatewayServices
Return A GatewayServices object.- Returns:
- A GatewayServices object.
- See Also:
-
addEvent
Add an event to the ColdFusion event service processing queue for delivery to a listener CFC.- Parameters:
msg- The CFEvent object containing the message to be queued for delivery.- Returns:
- true if the event was successfully added to the processing queue.
- See Also:
-
getQueueSize
public int getQueueSize()Return the current size of the gateway event queue. The maximum size of the gateway event queue is configurable by the ColdFusion MX Administrator. If the current queue size equals the maximum size, no further events can be added to the queue.- Returns:
- The number of messages in the queue.
- See Also:
-
getMaxQueueSize
public int getMaxQueueSize()Return the maximum size of the gateway event queue. The maximum event queue size is configurable in the ColdFusion MX Administrator. If the current queue equals this size, no further events can be added to the queue.- Returns:
- The maximum number of messges allowed in the queue.
- See Also:
-
getLogger
public coldfusion.eventgateway.Logger getLogger()Get the default event logging object. Messages will be writen to the eventgateway.log file in the ColdFusion log directory.- Returns:
- A logging object.
- See Also:
-
getLogger
Get a custom event logging object. Messages sent to this log will be written to the specified file in the ColdFusion log directory. The filename will have ".log" appended to it. For example, to send a log to the file mygateway.log, you would pass "mygateway" as the logfile parameter.- Parameters:
logfile- The base name of the log file, without an extension.- Returns:
- A logging object.
- See Also:
-