Overview of sending events
General remarks
It is often the case in a Java application that you want to trigger an event when the state of an object changes or when it is found in a specific state.
The "Sending events" pattern creates the events class, which is the interface for the objects that will want to listen and manage notifications.
In Java, events are grouped into event classes. Therefore in Java you have the following basic event classes: "Window", "Mouse" and "Key".
The sending events pattern follows the same principle.
Aim of the pattern
The use of the "Sending events" pattern allows you to generate events when an attribute or a simple association changes value, or when an attribute or a multiple association has elements added to it or removed from it.
Prerequisite
The "Sending events" pattern can be applied to any attribute or association.