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 synchronized 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.
    string getPool()
    string getState()
    private boolean invoker(any target, any data)
         Execute the interception point, returns a value if the chain should be stopped (true) or ignored (void/false).
    any process(any data)
         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 synchronized 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 - The key name of the object
    Returns:
    The requested object or an empty structure

    getPool

    public string getPool()


    getState

    public string getState()


    invoker

    private boolean invoker(any target, any data)

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

    Parameters:
    target - The target object
    data - The data used in the interception call
    Returns:
    A boolean indicator that the interception chain needs to be broken or not.

    process

    public any process(any data)

    Process this event pool according to it's name.

    Parameters:
    data - 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, will be lowercased to conform to non-case sensitivity
    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, will be lowercased to conform to non-case sensitivity