# Standalone Mode Listener

![](/files/-MOlslM_AvN8dP5EvOk6)

| **Argument**      | **Type** | **Execution Mode**     | **Description**                        |
| ----------------- | -------- | ---------------------- | -------------------------------------- |
| **interceptData** | struct   | **standalone-coldbox** | The data structure passed in the event |

```javascript
component{

    function configure(injector,properties){
        variables.injector = arguments.injector;
        variables.properties = arguments.properties;

        log = variables.injector.getLogBox().getLogger( this );
    }

    function beforeInjectorShutdown(interceptData){
        // Do my stuff here:

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

    function afterInstanceCreation(interceptData){
        var target = arguments.interceptData.target;
        var mapping = arguments.interceptData.mapping;

        log.info("The object #mapping.getName()# has just been built, performing my awesome AOP processing on it.");

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

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

* `injector` : An instance reference to the calling Injector where this listener will be registered with.
* `properties` : A structure of properties that passes through from the configuration file.

As you can see from the examples above, each Listener component can listen to multiple events. Now you might be asking yourself, in what order are these listeners executed in? Well, they are executed in the order they are declared in either the ColdBox configuration file as interceptors or the WireBox configuration file as listeners.

> **Caution** Order is EXTREMELY important for interceptors/listeners. So please make sure you order them in the declaration file.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wirebox.ortusbooks.com/2/usage/wirebox-event-model/wirebox-listeners/standalone-mode-listener.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
