The Event Handlers

The event handlers that you will produce for remote interaction are exactly the same as your other handlers, with the exception that they have a return type and return data back to the caller; our proxies. Then our proxies can strong type the return data elements:


function getCacheKeys(event,rc,prc){
    return getCache( rc.cacheProvider ).getKeys();

function listUsers(event,rc,prc){ = userService.list();

    if( event.isProxyRequest() ){


Hint The request context has a method called isProxyRequest() which tells the application if the request is coming from a ColdBox proxy.


array function getCachekEys(string cacheProvider='default'){
    arguments.event = "proxy.getCacheKeys";
    return process(argumentCollection=arguments);

string function getUsersJSON(){
    arguments.event = "proxy.listUsers";
    return serializeJSON( process(argumentCollection=arguments) );

Last updated