What is "observer-pattern"

The observer pattern (a subset of the pattern Publish/subscribe) is a software design standard in which an object, called the Subject, maintains a list of their dependents, called observers, and automatically notifies them of any change of state, usually calling one of their methods. It is mainly used to implement distributed event handling systems.

The Observer standard is also called Publisher-Subscriber, Event Generator and Dependents.

Wikipedia