Helma Logo
main list history

Callbacks

Helma NG provides a mechanism to bind Javascript functions as callbacks for arbitrary events. Events names can be freely assigned. By convention, Helma NG uses event names starting with "on", e.g. "onLogEvent".

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.

Java API

Class org.helma.javascript.RhinoEngine provides methods addCallback(), removeCallback, and invokeCallback() to register, remove, and invoke callbacks.

Javascript API

The helma.rhino module provides addCallback(), removeCallback(), and invokeCallback() methods to register, remove and invoke callbacks.

Callbacks used by Helma NG classes and modules

Links to this page: helma.logging, helma.system