|
ColdBox Platform v3.8.0 | ||||
FRAMES |
WEB-INF.cftags.componentcoldbox.system.web.services.BaseService
coldbox.system.web.services.InterceptorService
public class InterceptorService
The coldbox interceptor service
Constructor Summary | |
---|---|
init(any controller)
Constructor |
Method Summary | |
---|---|
any |
appendInterceptionPoints(any customPoints)
Append a list of custom interception points to the CORE interception points and returns itself |
any |
configure()
Configure the interceptor service |
private any |
createInterceptor(any interceptorClass, any interceptorName, [any<struct> interceptorProperties='[runtime expression]'])
Create an interceptor object |
any<array> |
getInterceptionPoints()
Get the interceptionPoints ENUM of all registered points of execution as an array |
any<struct> |
getInterceptionStates()
Get all the interception states defined in this service |
any |
getInterceptor([string interceptorName])
Get an interceptor according to its name from a state |
any |
getRequestBuffer()
Get a coldbox request buffer: coldbox |
any |
getStateContainer(any state)
Get a State Container, it will return a blank structure if the state is not found |
private any |
newPointRecord()
Create a new interception point record |
any |
onConfigurationLoad()
Fires after the main ColdBox application configuration is loaded |
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'])
Announce an interception to the system |
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], [any<struct> interceptorProperties='[runtime expression]'], [any customPoints=''], [any interceptorName])
Register an interceptor |
any |
registerInterceptors()
Register all the interceptors according to ColdBox configuration |
boolean |
unregister(any interceptorName, [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 coldbox.system.web.services.BaseService |
---|
convertToColdBox, getColdboxOCM, getController, getUtil, isFamilyType, onShutdown, setController
|
Methods inherited from class WEB-INF.cftags.component |
---|
None
|
Constructor Detail |
---|
public init(any controller)
controller
Method Detail |
---|
public any appendInterceptionPoints(any customPoints)
customPoints
- A comma delimmited list or array of custom interception points to append. If they already exists, then they will not be added again.public any configure()
private any createInterceptor(any interceptorClass, any interceptorName, [any<struct> interceptorProperties='[runtime expression]'])
interceptorClass
- The class path to instantiateinterceptorName
- The unique name of the interceptorinterceptorProperties
- The propertiespublic any<array> getInterceptionPoints()
public any<struct> getInterceptionStates()
public any getInterceptor([string interceptorName])
interceptorName
- The name of the interceptor to search forpublic any getRequestBuffer()
public any getStateContainer(any state)
state
- The state name to retrieveprivate any newPointRecord()
public any onConfigurationLoad()
onConfigurationLoad
in class
BaseService
private struct parseMetadata(any metadata, any points)
metadata
- The recursive metadatapoints
- The active points structurepublic any processState(any state, [any interceptData='[runtime expression]'], [boolean async='false'], [boolean asyncAll='false'], [boolean asyncAllJoin='true'], [string asyncPriority='NORMAL'], [numeric asyncJoinTimeout='0'])
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 timeout.public any registerInterceptionPoint(any interceptorKey, any state, any oInterceptor, [any interceptorMD])
interceptorKey
- The interceptor key to use for lookups in the state.state
- The state to createoInterceptor
- The interceptor to registerinterceptorMD
- The metadata about the interception point: {async, asyncPriority, eventPattern}public any registerInterceptor([any interceptorClass], [any interceptorObject], [any<struct> interceptorProperties='[runtime expression]'], [any customPoints=''], [any interceptorName])
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 classpublic any registerInterceptors()
public boolean unregister(any interceptorName, [any state=''])
interceptorName
- The name of the interceptor to search forstate
- The named state to unregister this interceptor from. If not passed, then it will be unregistered from all states.private any wireboxSetup()
|
ColdBox Platform v3.8.0 | ||||
FRAMES |