EventListener<T extends EventInfo>¶
An interface to define Observers (Listeners) that listen to specific changes in the state of a given observable object (Subject). By this way, the EventListener gets notified when the observed object has its state changed.
The interface was defined allowing the Subject object to have more than one state to be observable. If the subject directly implements this interface, it will allow only one kind of state change to be observable. If the Subject has multiple state changes to be observed, it can define multiple EventListener attributes to allow multiple events to be observed.
Manoel Campos da Silva Filho
- <T> – The class of the object containing information to be given to the listener when the expected event happens.