For the complete documentation index, see llms.txt. This page is also available as Markdown.

Standalone Mode Listener

In standalone mode, the listener is a simple class with a configure() method and any methods that match the name of the events. Each of these methods receive the following arguments:

Argument
Type
Description

data

struct

The data structure passed in the event

Example:

Please note the configure() method in the standalone listener. This is necessary when using Wirebox listeners outside of a ColdBox application. The configure() method receives two parameters:

  • injector : An instance reference to the calling Injector with which this listener will be registered.

  • properties : A structure of properties that passes through from the configuration file.

As you can see from the examples above, each class can listen to multiple events.

Order of Execution

Now, you might ask yourself, in what order are these listeners executed? They are executed in the order they are declared in either the ColdBox configuration file as interceptors or the WireBox configuration file as listeners.

Declaration

You will declare the listeners in the Binder using the listeners struct or method approach

Last updated

Was this helpful?