Mediator design pattern is used to provide a centralized communication medium between different objects in a system.
中介设计模式用于 在系统中不同对象之间提供集中的通信媒介。
According to GoF, mediator pattern intent is:
Allows loose coupling by encapsulating the way disparate sets of objects interact and communicate with each other. Allows for the actions of each object set to vary independently of one another.
Mediator Pattern Interface
Mediator Pattern Colleague Interface