ColdBox Mode Listener

ColdBox Interceptors

In ColdBox, you will create ColdBox Interceptors to listen to any event in the application. Each of these methods that listen to events receive the following arguments:


So, let's say we want to listen to the beforeInjectorShutdown and the afterInstanceCreation event in our listener.


    function configure(){}

    function beforeInjectorShutdown(event, data, buffer, rc, prc ){
        var injector =;
        // Do my stuff here:

        // I can use a log object because ColdBox is cool and injects one for me already."DUDE, I am going down!!!");

    function afterInstanceCreation(event, data, buffer, rc, prc ){
        var injector =;
        var target =;
        var mapping =;"The object #mapping.getName()# has just been built, performing my awesome AOP processing on it.");

        // process awesome AOP on this target
        processAwesomeAOP( target );

Last updated