Overview

Events provide a mechanism for loosely-coupled parts of the IBM Cúram Social Program Management application to communicate information about state changes in the system. When one module in the application raises an event, one or more other modules receive notification of that event having occurred provided they are registered as listeners for that event.

To make use of this functionality, some events have to be defined, some application code must raise these events, and some event handlers have to be defined and registered as listeners to such events. Developers must write and register event handlers (classes that perform some action when an event is raised) and optionally event filters (logic that determines whether or not to invoke the handler for a given event). Event handlers and filters are classes that implement callback interfaces in much the same way as in the classic observer pattern1.

1 The observer pattern is one of the design patterns made popular by the landmark book Design Patterns: Elements of Reusable Object-Oriented Software. It describes a generic listener framework.