This pattern allows several objects to communicate with one another without knowing one other's structures. This pattern defines an object that encapsulates how the objects will interact with one another and allows the code to be easily maintained through loose coupling.
Examples of the mediator pattern include:
The classes, interfaces, & objects in the above UML class diagram are defined as follows.
The mediator design pattern is applicable in the following situations: