Package coldfusion.eventgateway
Class CFEvent
java.lang.Object
coldfusion.util.CaseInsensitiveMap
coldfusion.util.FastHashtable
coldfusion.eventgateway.CFEvent
- All Implemented Interfaces:
coldfusion.runtime.CloneableMap,coldfusion.runtime.Copyable,Serializable,Cloneable,Map
public class CFEvent
extends coldfusion.util.FastHashtable
The message structure that is passed between gateways and ColdFusion CFML
application code.
gatewayType: The type of gateway. Usually corresponds to the message
type (SMS/IM/EMAIL/DB etc).
cfcPath: Overrides the default cfcPath specified in the ColdFusion MX
Administrator.
originatorID: Where the message came from.
gatewayID: The event gateway that handled the event or will handle the
outgoing message.
cfcMethod: The method in the CFC to call.
data: The message to pass to the CFC. It is in hashtable format for
flexibility.
cfcTimeOut: The time-out for the request. If set, the thread will use
it to set the time-out of the request; if not, the thread will use the
default request timeout.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class coldfusion.util.CaseInsensitiveMap
coldfusion.util.CaseInsensitiveMap.CFConcurrentHashMap -
Field Summary
Fields inherited from class coldfusion.util.CaseInsensitiveMap
map, mtProxy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the name of the CFC method that processes the message.Get the path to the listener CFC that processes this message.Get the time-out, in seconds, for the listener CFC to process the event request.getData()Get the message contents and other gateway-specific information.Identify the event gateway instance, as specified in the ColdFusion MX Administrator.Identify the gateway type of the gateway this message originated from.Identify the originator of an incoming message.voidSet the name of the CFC method that should processes an incoming message.voidsetCfcPath(String c) Specify the listener CFC that will process this event.voidsetCfcTimeOut(int d) Set the time-out, in seconds, during which the listener CFC must process the event request before ColdFusion gateway services terminates the request and logs an error in the application.log file.voidAdd the gateway-specific data, including any message contents, as a Java Map to the CFEvent object.voidsetGatewayType(String type) Set the type of event gateway, such as IM, SMS, or EMail.voidSet the originator of an incoming message.Methods inherited from class coldfusion.util.FastHashtable
clear, contains, containsKey, duplicate, elements, get, isEmpty, keys, put, putAll, remove, sizeMethods inherited from class coldfusion.util.CaseInsensitiveMap
_containsKey, caseHandledEntrySet, caseHandledKeySet, clone, containsValue, duplicate, entrySet, equals, get, hashCode, isCaseSensitive, keySet, put, remove, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
CFEvent
- Parameters:
gwID- The ID of the gateway. This parameter indicates the source of the message and must be the value that is passed in the Gateway constructor or set using the Gateway setGatewayID method.- See Also:
-
-
Method Details
-
setGatewayType
Set the type of event gateway, such as IM, SMS, or EMail.- Parameters:
type- The gateway type identifier. This ID is created by the Gateway class author and should reflect the type of gateway. It does not have to be gateway type name used in the ColdFusion Administrator.- See Also:
-
setOriginatorID
Set the originator of an incoming message.- Parameters:
id- The gateway or protocol-specific ID of the message originator.- See Also:
-
setCfcMethod
Set the name of the CFC method that should processes an incoming message.- Parameters:
e- The method in the listener CFC that ColdFusion will call to process this event. If you do not use this method in your gateway, ColdFusion invokes the onIncomingMessage method,- See Also:
-
setData
Add the gateway-specific data, including any message contents, as a Java Map to the CFEvent object.- Parameters:
m- The incoming message and any additional gateway-specific event data.- See Also:
-
setCfcPath
Specify the listener CFC that will process this event. Overrides the default (first) CFC path specified in the ColdFusion MX Administrator. This method allows a one-gateway-to-many-CFCs model.- Parameters:
c- An absolute path to the application listener CFC that will process the event.- See Also:
-
setCfcTimeOut
public void setCfcTimeOut(int d) Set the time-out, in seconds, during which the listener CFC must process the event request before ColdFusion gateway services terminates the request and logs an error in the application.log file. If you do not use this method, ColdFusion uses the Timeout Request value set on the Server Settings page in the ColdFusion MX Administrator.- Parameters:
d- Timeout period, in seconds.- See Also:
-
getGatewayType
Identify the gateway type of the gateway this message originated from.- Returns:
- The gateway type of the CFEvent object, or null.
- See Also:
-
getOriginatorID
Identify the originator of an incoming message. Some gateway types also use this field for the destination of an outgoing message.- Returns:
- The protocol-specific identifier of the message originator, or null.
- See Also:
-
getGatewayID
Identify the event gateway instance, as specified in the ColdFusion MX Administrator.- Returns:
- The Gateway ID, which is set in the class constructor or by a setGatewayID method.
- See Also:
-
getCfcMethod
Get the name of the CFC method that processes the message.- Returns:
- The name of the method that gateway services calls in the listener CFC, as set by the setCFCMethod method. If setCFCMethod has not been called, returns null, not the default method called by gateway services.
- See Also:
-
getData
Get the message contents and other gateway-specific information.- Returns:
- The event data Map, or null.
- See Also:
-
getCfcPath
Get the path to the listener CFC that processes this message.- Returns:
- An absolute path to the application listener CFC that processes the event, as set by the setCFCPath method. If the setCFCPath method has not been called, returns null, not the path specified in the ColdFusion MX Administrator.
- See Also:
-
getCfcTimeOut
Get the time-out, in seconds, for the listener CFC to process the event request.- Returns:
- The listener CFC time-out, in seconds, as set by the setCFCTimeout method, or null.
- See Also:
-