lucee.Component coldbox.system.core.events.EventPoolManager
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- A basic event pool manager for observed event pools. This event manager will manage 1 or more event pools. The manager will inspect target objects for implemented functions and match them to event states. However, if a function has the metadata attribute of 'observe=true' on it, then it will also add it as a custom state
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
struct
|
eventPoolContainer
Pool container struct.
|
true
|
false
|
|
any
|
eventStates
Event states to listen for.
|
true
|
false
|
|
any
|
stopRecursionClasses
Stop recurssion classes.
|
true
|
false
|
Constructor Summary | |
---|---|
init(array eventStates, [any stopRecursionClasses=''])
Constructor. |
Method Summary | |
---|---|
array
|
appendInterceptionPoints(any customStates)
Append a list of custom interception points to the CORE interception points and returns the points. |
any
|
getEventPool(any state)
Get an event pool by state name, if not found, it returns an empty structure. |
string
|
getEventPoolContainer()
|
string
|
getEventStates()
|
any
|
getObject(any name)
Get an object from the pool. |
string
|
getStopRecursionClasses()
|
private any
|
getUtil()
Get ColdBox utility object. |
private struct
|
parseMetadata(any metadata, struct eventsFound)
I get a component's valid observation states for registration. |
any
|
processState(any state, [struct interceptData='[runtime expression]'])
Process a state announcement. |
any
|
register(any target, [any name=''], [any customStates=''])
Register an object in an event pool. |
any
|
registerInEventState(any key, any state, any target)
Register an object with a specified event observation state. |
any
|
setEventPoolContainer(struct eventPoolContainer)
|
any
|
setEventStates(any eventStates)
|
any
|
setStopRecursionClasses(any stopRecursionClasses)
|
boolean
|
unregister(any name, [any state=''])
Unregister an object form an event pool state. |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
eventStates
- The event states to listen forstopRecursionClasses
- The classes (comma-delim) to not inspect for eventsProperty Detail |
---|
Pool container struct
access
- publicrequired
- falsereturntype
- anyserializable
- trueEvent states to listen for
access
- publicrequired
- falsereturntype
- anyserializable
- trueStop recurssion classes
access
- publicrequired
- falsereturntype
- anyserializable
- trueMethod Detail |
---|
Append a list of custom interception points to the CORE interception points and returns the points
customStates
- A comma delimmited list or array of custom interception states to append. If they already exists, then they will not be added again.Get an event pool by state name, if not found, it returns an empty structure
state
- The state to retrieveGet an object from the pool
name
- The name of the objectGet ColdBox utility object
I get a component's valid observation states for registration.
metadata
eventsFound
Process a state announcement. If the state does not exist it will ignore it.
state
- The state to processinterceptData
- The data to pass into the interception eventRegister an object in an event pool. If the target object is already in a state, it will not be added again. The object get's inspected for registered states or you can even send custom states in. Also, you can annotate the methods in the target object with 'observe=true' and we will register that state also.
target
- The target object to register in an event poolname
- The name to use when registering the object. If not passed, the name will be used from the object's metadatacustomStates
- A comma delimmited list of custom states, if the object or class sent in observes themRegister an object with a specified event observation state.
key
- The key to use when storing the objectstate
- The event state pool to save the object intarget
- The object to registereventPoolContainer
eventStates
stopRecursionClasses
Unregister an object form an event pool state. If no event state is passed, then we will unregister the object from ALL the pools the object exists in.
name
- The name of the object to unregisterstate
- The state to unregister from. If not passed, then we will unregister from ALL pools