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

    Nested classes/interfaces inherited from interface java.util.Map

    Map.Entry<K extends Object,V extends Object>
  • Field Summary

    Fields inherited from class coldfusion.util.CaseInsensitiveMap

    map, mtProxy
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Get 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.
    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.
    void
    Set the name of the CFC method that should processes an incoming message.
    void
    Specify the listener CFC that will process this event.
    void
    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.
    void
    Add the gateway-specific data, including any message contents, as a Java Map to the CFEvent object.
    void
    Set the type of event gateway, such as IM, SMS, or EMail.
    void
    Set the originator of an incoming message.

    Methods inherited from class coldfusion.util.FastHashtable

    clear, contains, containsKey, duplicate, elements, get, isEmpty, keys, put, putAll, remove, size

    Methods inherited from class coldfusion.util.CaseInsensitiveMap

    _containsKey, caseHandledEntrySet, caseHandledKeySet, clone, containsValue, duplicate, entrySet, equals, get, hashCode, isCaseSensitive, keySet, put, remove, toString, values

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CFEvent

      public CFEvent(String gwID)
      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

      public void setGatewayType(String type)
      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

      public void setOriginatorID(String id)
      Set the originator of an incoming message.
      Parameters:
      id - The gateway or protocol-specific ID of the message originator.
      See Also:
    • setCfcMethod

      public void setCfcMethod(String e)
      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

      public void setData(Map m)
      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

      public void setCfcPath(String c)
      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

      public String 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

      public String 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

      public String 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

      public String 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

      public Map getData()
      Get the message contents and other gateway-specific information.
      Returns:
      The event data Map, or null.
      See Also:
    • getCfcPath

      public String 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

      public Integer 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: