railo-context.Component coldbox.system.core.events.EventPoolManager
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.
Constructor Summary | |
---|---|
init(array eventStates, [string stopRecursionClasses=''])
Constructor. |
Method Summary | |
---|---|
void
|
appendInterceptionPoints(string customStates)
Append a list of custom event states to the CORE observation states. |
any
|
getEventPool(string state)
Get an event pool by state name, if not found, it returns an empty structure. |
struct
|
getEventPoolContainer()
Get all the registered event pools in the event manager. |
string
|
getEventStates()
Get the registered event states in this event manager. |
any
|
getObject([string name])
Get an object from a registered event pool. |
string
|
getStopRecursionClasses()
The classes that should stop recursion for observation points. |
private Util
|
getUtil()
Create and return a util object. |
private struct
|
parseMetadata(any metadata, struct eventsFound)
I get a component's valid observation states for registration. |
void
|
processState(string state, [struct interceptData='[runtime expression]'])
Process a state announcement. |
void
|
register(any target, [string name=''], [string customStates=''])
Register an object in an event pool. |
private void
|
registerInEventState(string key, string state, any target)
Register an object with a specified event observation state. |
boolean
|
unregister(string name, string state='')
Unregister an object form an event pool state. |
Methods inherited from class railo-context.Component |
---|
None |
Constructor Detail |
---|
Constructor
eventStates
- The event states to listen forstopRecursionClasses
- The classes (comma-delim) to not inspect for eventsMethod Detail |
---|
Append a list of custom event states to the CORE observation states
customStates
- A comma delimmited list of custom observation 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 all the registered event pools in the event manager
Get the registered event states in this event manager
Get an object from a registered event pool.
name
- The name of the object to search forThe classes that should stop recursion for observation points
Create and return a util object
I get a component's valid observation states for registration.
metadata
- The recursive metadataeventsFound
- The event states found in the objectProcess a state announcement. If the state does not exist, it will ignore it
state
- The state to processinterceptData
- A data structure used to pass intercepted information.Register 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 them.Register an object with a specified event observation state.
key
- The key to use when storing the object.state
- The event state pool to save the object intarget
- The object to registerUnregister 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 named state to unregister this object from. If not passed, then we will unregister the object from ALL the pools it exists in.