ColdBox Platform Version 2.6.4

coldbox.system.services
Class HandlerService

WEB-INF.cftags.component
        extended by coldbox.system.services.BaseService
            extended by coldbox.system.services.HandlerService

public class HandlerService
extends BaseService

This is the main Coldbox Handler service


Constructor Summary
init(any controller)
          Constructor
 
Method Summary
 void clearDictionaries()
          Clear the internal cache dictionaries
 void defaultEventCheck(any event)
          Do a default Event check on the incoming event
 BaseDictionary getEventCacheDictionary()
 struct getEventMetadataEntry(any targetEvent)
          Get an event string's metadata entry
 any getHandler(any ehBean, any RequestContext)
          Returns a valid event handler object ready for execution
 BaseDictionary getHandlerCacheDictionary()
 array getHandlerListing(string directory)
          Get an array of registered handlers
 struct getNewMDEntry()
          Get a new metadata entry structure
 EventHandlerBean getRegisteredHandler(any event)
          I parse the incoming event string into an event handler bean that is used for executions
private void invalidEvent(string event, any ehBean)
          Invalid Event procedures
 any newHandler(string invocationPath)
          Create a New Handler Instance
 void onConfigurationLoad()
          Called by loader service when configuration file loads
 void registerHandlers()
          I register your application's event handlers
private void saveEventCachingmetadata(any eventUDF, any cacheKey, any cacheKeySuffix)
          Save a handler's event caching metadata in the dictionary
private void saveHandlerMetadata(any targetHandler, any cacheKey, boolean force='false')
          Save a handler's persistence metadata in the dictionary
 void setEventCacheDictionary(BaseDictionary EventCacheDictionary)
 void setHandlerCacheDictionary(BaseDictionary HandlerCacheDictionary)
 
Methods inherited from class coldbox.system.services.BaseService
convertToColdBox, debug, getColdboxOCM, getLogger, getUtil, getcontroller, isFamilyType, onAspectsLoad, onShutdown, setcontroller
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(any controller)
Constructor

Parameters:
controller
Method Detail

clearDictionaries

public void clearDictionaries()
Clear the internal cache dictionaries


defaultEventCheck

public void defaultEventCheck(any event)
Do a default Event check on the incoming event

Parameters:
event - The created event context to test.

getEventCacheDictionary

public BaseDictionary getEventCacheDictionary()


getEventMetadataEntry

public struct getEventMetadataEntry(any targetEvent)
Get an event string's metadata entry

Parameters:
targetEvent - The target event

getHandler

public any getHandler(any ehBean, any RequestContext)
Returns a valid event handler object ready for execution

Parameters:
ehBean - The event handler bean to use: coldbox.system.beans.EventHandlerBean
RequestContext - The request context

getHandlerCacheDictionary

public BaseDictionary getHandlerCacheDictionary()


getHandlerListing

public array getHandlerListing(string directory)
Get an array of registered handlers

Parameters:
directory

getNewMDEntry

public struct getNewMDEntry()
Get a new metadata entry structure


getRegisteredHandler

public EventHandlerBean getRegisteredHandler(any event)
I parse the incoming event string into an event handler bean that is used for executions.

Parameters:
event - The full event string to check and get.

invalidEvent

private void invalidEvent(string event, any ehBean)
Invalid Event procedures. Throws EventHandlerNotRegisteredException

Parameters:
event - The event that was found invalid
ehBean - The event handler bean

newHandler

public any newHandler(string invocationPath)
Create a New Handler Instance

Parameters:
invocationPath - The handler invocation path

onConfigurationLoad

public void onConfigurationLoad()
Called by loader service when configuration file loads

Overrides:
onConfigurationLoad in class BaseService

registerHandlers

public void registerHandlers()
I register your application's event handlers


saveEventCachingmetadata

private void saveEventCachingmetadata(any eventUDF, any cacheKey, any cacheKeySuffix)
Save a handler's event caching metadata in the dictionary

Parameters:
eventUDF - The handler event UDF to inspect
cacheKey - The event cache key
cacheKeySuffix - The event cache key suffix

saveHandlerMetadata

private void saveHandlerMetadata(any targetHandler, any cacheKey, boolean force='false')
Save a handler's persistence metadata in the dictionary

Parameters:
targetHandler - The handler target
cacheKey - The handler cache key
force - Force the md lookup. Most likely used when controller caching is off

setEventCacheDictionary

public void setEventCacheDictionary(BaseDictionary EventCacheDictionary)

Parameters:
EventCacheDictionary

setHandlerCacheDictionary

public void setHandlerCacheDictionary(BaseDictionary HandlerCacheDictionary)

Parameters:
HandlerCacheDictionary

ColdBox Platform Version 2.6.4