Print
Application listeners

Introduction

An ApplicationListener is a component that is created before any other components in the application. It receives notifications at the start of block creation, after each block is created, when all blocks are created and when the application is stopped.

How to make an application listener

Like normal blocks, an application listener can be LogEnabled and take configuration via Configurable. The special feature is that it must implement ApplicationListener and implement the eight methods that are a consequence of that. The following section in assembly.xml causes instantiation of the application listener:

<listener class="pkg.MyApplicationListener" name="a-suitable-name" />
Powered by Atlassian Confluence