commandbox.system.services

Class InterceptorService

lucee.Component
    extended by commandbox.system.services.InterceptorService

Copyright Since 2005 ColdBox Platform by Ortus Solutions, Corp www.coldbox.org | www.ortussolutions.com The InterceptorService that wraps the EventPoolManager and provides special treatment for interceptors to give them virtual inheritance and autowiring

Class Attributes:
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
  • author : Brad Wood, Luis Majano
  •  
    Property Summary
    type property default serializable required
    any EventPoolManager


    • access = public
    • returntype = any
    true false
    any InterceptionPoints


    • access = public
    • returntype = any
    true false
    any Shell


    • access = public
    • returntype = any
    true false
    boolean configured


    • access = public
    • returntype = any
    false true false
    any log


    • access = public
    • returntype = any
    • inject = logbox:logger:{this}
    true false
    Constructor Summary
    init(any shell)
    Method Summary
    any announceInterception(string state, [struct interceptData='[runtime expression]'])
    any appendInterceptionPoints(any customPoints='')
         Append a list of custom interception points to the CORE interception points and returns itself.
    any configure()
    any createInterceptor(string interceptorClass, [any interceptorName], [any interceptorProperties='[runtime expression]'])
    string getConfigured()
    string getEventPoolManager()
    string getInterceptionPoints()
    any getInterceptionStates()
         Get the registered event states in this event manager.
    any getInterceptor(string interceptorName)
         Get an interceptor according to its name from a state.
    string getLog()
    string getShell()
    any processState(string state, [struct interceptData='[runtime expression]'])
    any registerInterceptor([any interceptor], [struct interceptorProperties='[runtime expression]'], [string customPoints=''], [string interceptorName=''])
    any setConfigured(boolean configured)
    any setEventPoolManager(any EventPoolManager)
    any setInterceptionPoints(any InterceptionPoints)
    any setLog(any log)
    any setShell(any Shell)
    any unregister(string name, [any state=''])
         Unregister an interceptor from an interception state or all states.
    private any wireboxSetup()
         Verifies the setup for interceptor classes is online.
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init(any shell)

    Parameters:
    shell

    Property Detail

    EventPoolManager

    property any EventPoolManager

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

    InterceptionPoints

    property any InterceptionPoints

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

    Shell

    property any Shell

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

    configured

    property boolean configured = [false]

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

    log

    property any log

    Attributes:
    access - public
    required - false
    returntype - any
    inject - logbox:logger:{this}
    serializable - true

    Method Detail

    announceInterception

    public any announceInterception(string state, [struct interceptData='[runtime expression]'])

    Parameters:
    state
    interceptData

    appendInterceptionPoints

    public any appendInterceptionPoints(any customPoints='')

    Append a list of custom interception points to the CORE interception points and returns itself

    Parameters:
    customPoints - A comma delimmited list or array of custom interception points to append. If they already exists, then they will not be added again.

    configure

    public any configure()


    createInterceptor

    public any createInterceptor(string interceptorClass, [any interceptorName], [any interceptorProperties='[runtime expression]'])

    Parameters:
    interceptorClass - The class path to instantiate
    interceptorName - The unique name of the interceptor
    interceptorProperties - The properties

    getConfigured

    public string getConfigured()


    getEventPoolManager

    public string getEventPoolManager()


    getInterceptionPoints

    public string getInterceptionPoints()


    getInterceptionStates

    public any getInterceptionStates()

    Get the registered event states in this event manager


    getInterceptor

    public any getInterceptor(string interceptorName)

    Get an interceptor according to its name from a state.

    Parameters:
    interceptorName

    getLog

    public string getLog()


    getShell

    public string getShell()


    processState

    public any processState(string state, [struct interceptData='[runtime expression]'])

    Parameters:
    state
    interceptData

    registerInterceptor

    public any registerInterceptor([any interceptor], [struct interceptorProperties='[runtime expression]'], [string customPoints=''], [string interceptorName=''])

    Parameters:
    interceptor - The qualified class of the interceptor to register or an already instantiated object as an interceptor.
    interceptorProperties - The structure of properties to register this interceptor with.
    customPoints - A comma delimmited list or array of custom interception points, if the object or class sent in observes them.
    interceptorName - The name to use for the interceptor when stored. If not used, we will use the name found in the object's class

    setConfigured

    public any setConfigured(boolean configured)

    Parameters:
    configured

    setEventPoolManager

    public any setEventPoolManager(any EventPoolManager)

    Parameters:
    EventPoolManager

    setInterceptionPoints

    public any setInterceptionPoints(any InterceptionPoints)

    Parameters:
    InterceptionPoints

    setLog

    public any setLog(any log)

    Parameters:
    log

    setShell

    public any setShell(any Shell)

    Parameters:
    Shell

    unregister

    public any unregister(string name, [any state=''])

    Unregister an interceptor from an interception state or all states. If the state does not exists, it returns false

    Parameters:
    name
    state

    wireboxSetup

    private any wireboxSetup()

    Verifies the setup for interceptor classes is online