Whatever message this page gives is out now! Go check it out!
| Signature | Description |
void setGatewayID(String id) | 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. |
void setCFCListeners(String[] 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. |
GatewayHelper getHelper() | 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 function. |
String getGatewayID() | Returns the gateway ID. |
int getStatus() | Gets the event gateway status. The interface defines the following status constants: STARTING, RUNNING, STOPPING, STOPPED, FAILED. |
void start() | Starts the event gateway. Starts at least one thread for processing incoming messages. ColdFusion calls this method when it starts an event gateway. |
void stop() | Stops the event gateway. Stops the threads and destroys any resources. ColdFusion calls this method when it stops an event gateway. |
void restart() | Restarts a running event gateway. ColdFusion calls this method when the ColdFusion Administrator restarts a running event gateway. |
String outgoingMessage (coldfusion. eventgateway.CFEvent cfmessage) | 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. The CFML SendGatewayMessage function gets the returned String as its return value. |
| Signature | Description |
GatewayServices getGatewayServices | Static method that returns the GatewayServices object. Gateway code can call this method at any time, if necessary. |
boolean addEventmsg) | Sends a CFEvent instance to ColdFusion for dispatching to a listener CFC. The 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. |
int getQueueSize | Returns the current size of the ColdFusion event queue. This queue handles all messages for all gateways. |
int getMaxQueueSize | 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 Logging events and using log files in Building an event gateway . |
| Methods | Description |
CFEvent gatewayID) | CFEvent constructor. The gatewayID parameter must be the value that is passed in the gateway constructor or set using the Gateway setGatewayID method. |
void setGatewayType type)String getGatewayType | 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 method to a case-insensitive Map. As a result, do not create entries in the data with names that differ only in case. | |
void setOriginatorID id)String getOriginatorID | Identifies the originator of an incoming message or the destination of an outgoing message. The value depends on the protocol or event gateway type. |
void setCFCPath path)String getCFCPath | 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. |
void setCFCMethod method)String getCFCMethod | The method in the listener CFC that ColdFusion calls to process this event. By default, ColdFusion calls the onIncomingMessage method. For the sake of consistency, Adobe recommends that any event gateway with a single listener does not override this default. A gateway, such as the ColdFusion XMPP gateway, that uses different listener methods for different message types, uses this method to identify the destination method. |
void setCFCTimeout seconds)String getCFCTimeout | The time-out, in seconds, for the listener CFC to process the event request. When ColdFusion calls the listener CFC to process the event, and the CFC does not process the event in the specified time-out period, ColdFusion terminates the request and logs an error in the application.log file. By default, ColdFusion uses the Timeout Request value set on the Server Settings page in the ColdFusion Administrator. |
String getGatewayID | The event gateway instance that processes the event. Returns the gateway ID that was set in the CFEvent constructor. |
public SocketHelper() { } public coldfusion.runtime.Array getSocketIDs () { coldfusion.runtime.Array a = new coldfusion.runtime.Array(); Enumeration e = socketRegistry.elements(); while (e.hasMoreElements()) { a.add(((SocketServerThread)e.nextElement()).getName()); } return a; } public boolean killSocket (String socketid) { try { ((SocketServerThread)socketRegistry.get(socketid)).socket.close(); ((SocketServerThread)socketRegistry.get(socketid)).socket = null; socketRegistry.remove(socketid); return true; } catch (IOException e) { return false; } } } |
port=4445 |