GOF Intent: Encapsulate a series of object interactions with an intermediary object
Role:
Mediator: The mediator defines an interface for communicating with colleague objects
ConcreteMediator: To hold a reference to each colleague, or to hold a list of colleagues.
Colleague class (colleague): Holds the reference of the mediator. To communicate with other colleagues, you can check the communication of colleagues through the interface of the mediator.
Implementation points: The intermediary holds a list of colleagues, and provides a communication interface (to be able to find the designated colleagues), and the colleagues hold the reference of the middleman.