This chapter covers how to use the observer pattern (behavioral pattern) as a way to send messages to whoever needs them or whoever is listening. The chapter also shows how the Spring Framework implements this pattern through its application events, which can be declared as a simple interface implementation or by using specialized annotations.
The Observer Pattern
This particular pattern defines one-to-many dependencies between objects, so when one object (the subject) change its state, it needs to inform the others (observers) about this change. Then they can react to the change, as shown ...