It is possible to register multiple callbacks per event. The addCallback() and removeCallback() methods take a name argument to identify the callback. When a callback event is invoked, all callback functions are sequentially. If no callback is registered invokeCallback returns silently.
The helma.rhino module provides addCallback(), removeCallback(), and invokeCallback() methods to register, remove and invoke callbacks.
- onRequest is called by the helma.simpleweb module at the beginning of the handleRequest() method with the Request object as argument.
- onResponse is called by the helma.simpleweb module at the end of the handleRequest() method with the Response object as argument.
- onLogEvent is called by org.helma.util.RhinoAppender with the formatted log message as argument and optionally a formatted stack trace as second argument.