|
ColdBox Platform Version 3.7.0 | ||||
FRAMES |
WEB-INF.cftags.componentcoldbox.system.core.events.EventPool
coldbox.system.web.context.InterceptorState
public class InterceptorState
I am a pool of interceptors that can execute on a state or interception value.
Constructor Summary | |
---|---|
init(any state, any logbox)
constructor |
Method Summary | |
---|---|
boolean |
exists(any interceptorKey)
Checks if the passed interceptor key already exists |
any |
getInterceptor(any interceptorKey)
Get an interceptor from this state |
any |
getInterceptors()
Get the interceptors linked hash map |
any |
getMetadataMap([any interceptorKey])
Return the state's metadata map for it's registered interecptors |
private any |
invoker(any interceptor, any event, any interceptData, any interceptorKey, any buffer)
Execute an interceptor execution point |
private any |
invokerAsync(any event, any interceptData, any interceptorKey, [any asyncPriority='normal'])
Execute an interceptor execution point asynchronously |
any |
isExecutable(any target, any event, any targetKey)
Checks if an interceptor is executable or not |
any |
process(any event, any interceptData, [boolean async='false'], [boolean asyncAll='false'], [boolean asyncAllJoin='true'], [string asyncPriority='NORMAL'], [numeric asyncJoinTimeout='0'], any buffer)
Process this state's interceptors |
private any |
processAsync([any event], [any interceptData], [any asyncPriority='NORMAL'])
Process an execution asynchronously |
private any |
processAsyncAll([any event], [any interceptData], [any asyncAllJoin='true'], [any asyncPriority='NORMAL'], [any asyncJoinTimeout='0'], [any buffer])
Process an execution asynchronously for each interceptor state |
private any |
processSync([any event], [any interceptData], [any buffer])
Process an execution synchronously |
any |
register(any interceptorKey, any interceptor, any interceptorMD)
Register an interceptor class with this state |
any |
unregister(any interceptorKey)
Unregister an interceptor class from this state |
Methods inherited from class coldbox.system.core.events.EventPool |
---|
getObject, getPool, getState, setState
|
Methods inherited from class WEB-INF.cftags.component |
---|
|
Constructor Detail |
---|
public init(any state, any logbox)
state
- The interception state I modellogbox
- An instance of logboxMethod Detail |
---|
public boolean exists(any interceptorKey)
exists
in class
EventPool
interceptorKey
- The interceptor key class to verify it existspublic any getInterceptor(any interceptorKey)
interceptorKey
- The interceptor key class to retrievepublic any getInterceptors()
public any getMetadataMap([any interceptorKey])
interceptorKey
- Pass a key and retrieve that interceptor's metadata map onlyprivate any invoker(any interceptor, any event, any interceptData, any interceptorKey, any buffer)
invoker
in class
EventPool
interceptor
- The interceptor reference from cacheevent
- The event contextinterceptData
- A metadata structure used to pass intercepted information.interceptorKey
- The interceptor key to invokebuffer
- The request buffer object that can be used to produce output from interceptor chainsprivate any invokerAsync(any event, any interceptData, any interceptorKey, [any asyncPriority='normal'])
event
- The event contextinterceptData
- A metadata structure used to pass intercepted information.interceptorKey
- The interceptor key to invokeasyncPriority
- The thread priority for the executionpublic any isExecutable(any target, any event, any targetKey)
target
- The target interceptor to checkevent
- The event context object.targetKey
- The target interceptor key to check.public any process(any event, any interceptData, [boolean async='false'], [boolean asyncAll='false'], [boolean asyncAllJoin='true'], [string asyncPriority='NORMAL'], [numeric asyncJoinTimeout='0'], any buffer)
process
in class
EventPool
event
- The event context object.interceptData
- 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.buffer
- The request buffer object that can be used to produce output from interceptor chainsprivate any processAsync([any event], [any interceptData], [any asyncPriority='NORMAL'])
event
- The event context object.interceptData
- A data structure used to pass intercepted information.asyncPriority
- The thread priority to be used. Either LOW, NORMAL or HIGH. The default value is NORMALprivate any processAsyncAll([any event], [any interceptData], [any asyncAllJoin='true'], [any asyncPriority='NORMAL'], [any asyncJoinTimeout='0'], [any buffer])
event
- The event context object.interceptData
- A data structure used to pass intercepted information.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.buffer
- The request buffer object that can be used to produce output from interceptor chainsprivate any processSync([any event], [any interceptData], [any buffer])
event
- The event context object.interceptData
- A data structure used to pass intercepted information.buffer
- The request buffer object that can be used to produce output from interceptor chainspublic any register(any interceptorKey, any interceptor, any interceptorMD)
register
in class
EventPool
interceptorKey
- The interceptor key class to registerinterceptor
- The interceptor reference from the cache.interceptorMD
- The interceptor state metadata.public any unregister(any interceptorKey)
unregister
in class
EventPool
interceptorKey
- The interceptor key class to Unregister
|
ColdBox Platform Version 3.7.0 | ||||
FRAMES |