railo-context.Component coldbox.system.web.services.BaseService coldbox.system.web.services.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 |
---|
getController, onShutdown, setController |
Methods inherited from class railo-context.Component |
---|
None |
Constructor Detail |
---|
Constructor
controller
Method 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 interceptor service
Create an interceptor object
interceptorClass
- The class path to instantiateinterceptorName
- The unique name of the interceptorinterceptorProperties
- The propertiesGet the interceptionPoints ENUM of all registered points of execution as an array
Get all the interception states defined in this service
Get an interceptor according to its name from a state. If retrieved, it does not mean that the interceptor is registered still. Use the deepSearch argument if you want to check all the interception states for the interceptor.
interceptorName
- The name of the interceptor to search forGet a coldbox request buffer: coldbox.system.core.util.RequestBuffer
Get a State Container, it will return a blank structure if the state is not found.
state
- The state name to retrieveCreate a new interception point record
Fires after the main ColdBox application configuration is loaded
onConfigurationLoad
in class
BaseService
I get a components valid interception points
metadata
- The recursive metadatapoints
- The active points structureAnnounce an interception to the system. If you use the asynchronous facilities, you will get a thread structure report as a result.
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.Register an Interception point into a new or created interception state.
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}Register an interceptor. This method is here for runtime additions. If the interceptor is already in a state, it will not be added again. You can register an interceptor by class or with an already instantiated and configured object.
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 classRegister all the interceptors according to ColdBox configuration. All interception states are lazy loaded in.
Unregister an interceptor from an interception state or all states. If the state does not exists, it returns false
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.Verifies the setup for interceptor classes is online