coldbox.system.core.events

Class EventPool

lucee.Component
    extended by coldbox.system.core.events.EventPool
Direct Known Subclasses:
InterceptorState

Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- This object models an event driven pool of objects

Class Attributes:
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any<java.util.LinkedHashMap> pool
          The collection of listeners in the pool backed by a linked hashmap which is synchornized for threading.

    • access = public
    • returntype = any
    • doc_generic = java.util.LinkedHashMap
    true false
    any state
          The event pool state name.

    • access = public
    • returntype = any
    true false
    Constructor Summary
    init(any state)
          Constructor.
    Method Summary
    boolean exists(any key)
         Check if a key exists in the pool.
    any getObject(any key)
         Get an object from this event pool.
    any getPool()
         Stupid accessors in CF11 does not work.
    string getState()
    private any invoker(any target, any interceptData)
         Execute the interception point, returns a value if the chain should be stopped (true) or ignored (void/false).
    any process(any interceptData)
         Process this event pool according to it's name.
    any register(any key, any target)
         Register an object with this pool.
    any setPool(any pool)
    any setState(any state)
    boolean unregister(any key)
         Unregister an object from this pool.
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init(any state)

    Constructor

    Parameters:
    state - The name of the pool

    Property Detail

    pool

    property any<java.util.LinkedHashMap> pool

    The collection of listeners in the pool backed by a linked hashmap which is synchornized for threading

    Attributes:
    access - public
    required - false
    returntype - any
    doc_generic - java.util.LinkedHashMap
    serializable - true

    state

    property any state

    The event pool state name

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    Method Detail

    exists

    public boolean exists(any key)

    Check if a key exists in the pool

    Parameters:
    key

    getObject

    public any getObject(any key)

    Get an object from this event pool. Else return a blank structure if not found

    Parameters:
    key

    getPool

    public any getPool()

    Stupid accessors in CF11 does not work.


    getState

    public string getState()


    invoker

    private any invoker(any target, any interceptData)

    Execute the interception point, returns a value if the chain should be stopped (true) or ignored (void/false)

    Parameters:
    target - The target object
    interceptData - The data used in the interception call

    process

    public any process(any interceptData)

    Process this event pool according to it's name.

    Parameters:
    interceptData - The data used in the interception call
    Returns:
    EventPool

    register

    public any register(any key, any target)

    Register an object with this pool

    Parameters:
    key - The key of the object
    target - The object
    Returns:
    EventPool

    setPool

    public any setPool(any pool)

    Parameters:
    pool

    setState

    public any setState(any state)

    Parameters:
    state

    unregister

    public boolean unregister(any key)

    Unregister an object from this pool

    Parameters:
    key - The key of the object