Bean Internals  «Prev 

JavaBean Event Source Event Listeners

Bound properties and Events, event sources, and event listeners

The concept of a listener comes from the Java 1.1 delegation event model, which is based on
  1. events,
  2. event sources, and
  3. event listeners.
An event is a notification sent to an interested party whenever some action takes place.
In the case of bound properties, the action is the changing of the property.
Also, the event source is the Bean whose bound property changed, while the event listener is the interested party receiving the notification.
 Event sources and listeners
Figure 4-11: Event sources and listeners

java.util

The Java package java.util provides basic support for the event model. It provides a base class for event objects, as well as a base interface for event listeners. All of the classes and interfaces in the Java class libraries that use the event model make use of these classes. When you are developing Beans, or any other Java class that leverages the event model, you will be working directly with these classes and interfaces or their subclasses.