Mediator design pattern is one of the important and widely used behavioral design pattern. It enables decoupling of objects by introducing a layer in between so that the interaction between objects happen via the glue layer.
If the objects interact with each other directly, the system components are tightly-coupled with each other - and that increases maintenance cost. Mediator pattern focuses on providing a mediator between objects for communication and help in implementing lose-coupling between objects.
It limits subclassing. A mediator localizes behavior that otherwise would be distributed among several objects. Changing this behaviour requires subclassing Mediator only, Colleague classes can be reused as is. But, at the same time, It centralizes control. The mediator pattern trades complexity of interaction for complexity in the mediator. Because a mediator encapsulates protocols, it can become more complex than any individual colleague. This can make the mediator itself a monolith that’s hard to maintain