lucee.Component coldbox.system.web.services.BaseService coldbox.system.web.services.InterceptorService
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- This service takes care of all events and interceptions in ColdBox
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
array
|
interceptionPoints
Interception Points which can be announced.
|
true
|
false
|
|
struct
|
interceptionStates
Interception States that represent the unique points.
|
true
|
false
|
|
struct
|
interceptorConfig
Interceptor Service Configuration.
|
true
|
false
|
Constructor Summary | |
---|---|
init(any controller)
Constructor. |
Method Summary | |
---|---|
array
|
appendInterceptionPoints(any customPoints)
Append a list of custom interception points to the CORE interception points and returns itself. |
InterceptorService
|
configure()
Configure the service. |
any
|
createInterceptor(any interceptorClass, any interceptorName, [struct interceptorProperties='[runtime expression]'])
Create a new interceptor object with ColdBox pizzaz. |
string
|
getInterceptionPoints()
|
string
|
getInterceptionStates()
|
any
|
getInterceptor(any interceptorName)
Retrieve an interceptor from the system by name, if not found, this method will throw an exception. |
string
|
getInterceptorConfig()
|
struct
|
getLazyBuffer()
Produce a lazy buffer for performance considerations. |
any
|
getStateContainer(any state)
Get a State Container, it will return a blank structure if the state is not found. |
private struct
|
newPointRecord()
Create a new interception point record. |
any
|
onConfigurationLoad()
Run once config loads. |
private struct
|
parseMetadata(any metadata, any points)
I get a components valid interception points. |
any
|
processState(any state, [any interceptData='[runtime expression]'], [boolean async='false'], [boolean asyncAll='false'], [boolean asyncAllJoin='true'], [string asyncPriority='NORMAL'], [numeric asyncJoinTimeout='0'])
Process a State's Interceptors. |
any
|
registerInterceptionPoint(any interceptorKey, any state, any oInterceptor, [any interceptorMD])
Register an Interception point into a new or created interception state. |
any
|
registerInterceptor([any interceptorClass], [any interceptorObject], [struct interceptorProperties='[runtime expression]'], [any customPoints=''], [any interceptorName])
Register a new interceptor in ColdBox. |
any
|
registerInterceptors()
Registers all the interceptors configured. |
any
|
setInterceptionPoints(array interceptionPoints)
|
any
|
setInterceptionStates(struct interceptionStates)
|
any
|
setInterceptorConfig(struct interceptorConfig)
|
boolean
|
unregister(any interceptorName, [any state=''])
Unregister an interceptor from an interception state or all states. |
private InterceptorService
|
wireboxSetup()
Verifies the setup for interceptor classes is online. |
Methods inherited from class coldbox.system.web.services.BaseService |
---|
getController, onShutdown, setController |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
controller
Property Detail |
---|
Interception Points which can be announced
access
- publicrequired
- falsereturntype
- anyserializable
- trueInterception States that represent the unique points
access
- publicrequired
- falsereturntype
- anyserializable
- trueInterceptor Service Configuration
access
- publicrequired
- falsereturntype
- anyserializable
- trueMethod Detail |
---|
Append a list of custom interception points to the CORE interception points and returns itself
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 the service
Create a new interceptor object with ColdBox pizzaz
interceptorClass
- The class path to instantiateinterceptorName
- The unique name of the objectinterceptorProperties
- Construction propertiesRetrieve an interceptor from the system by name, if not found, this method will throw an exception
interceptorName
- The name to retrieveProduce a lazy buffer for performance considerations
Get a State Container, it will return a blank structure if the state is not found.
state
- The state to retrieveCreate a new interception point record
Run once config loads
onConfigurationLoad
in class
BaseService
I get a components valid interception points
metadata
points
Process a State's Interceptors Announce an interception to the system. If you use the asynchronous facilities, you will get a thread structure report as a result. This is needed so interceptors can write to the page output buffer
state
- An interception state to processinterceptData
- A data structure used to pass intercepted information.async
- If true, the entire interception chain will be ran in a separate thread.asyncAll
- If true, each interceptor in the interception chain will be ran in a separate thread and then joined together at the end.asyncAllJoin
- If true, each interceptor in the interception chain will be ran in a separate thread and joined together at the end by default. If you set this flag to false then there will be no joining and waiting for the threads to finalize.asyncPriority
- The thread priority to be used. Either LOW, NORMAL or HIGH. The default value is NORMALasyncJoinTimeout
- The timeout in milliseconds for the join thread to wait for interceptor threads to finish. By default there is no timeoutRegister an Interception point into a new or created interception state
interceptorKey
- The interceptor key to use for lookups in the statestate
- The state to createoInterceptor
- The interceptor to registerinterceptorMD
- The metadata about the interception point: {async, asyncPriority, eventPattern}Register a new interceptor in ColdBox
interceptorClass
- Mutex with interceptorObject, this is the qualified class of the interceptor to registerinterceptorObject
- Mutex with interceptor Class, this is used to register an already instantiated object as an interceptorinterceptorProperties
- 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 classRegisters all the interceptors configured
interceptionPoints
interceptionStates
interceptorConfig
Unregister an interceptor from an interception state or all states. If the state does not exists, it returns false
interceptorName
- The interceptor to unregisterstate
- The state to unregister from, if not, passed, then from all statesVerifies the setup for interceptor classes is online