The Mediator pattern defines an object that encapsulates how a set of objects interact. It promotes loose coupling by keeping objects from referring to each other explicitly, and it allows their interaction to be varied independently. The pattern defines a mediator interface for communicating with colleague objects. A concrete mediator implements cooperative behavior by coordinating the colleagues. Colleague classes each know their mediator and communicate through it rather than interacting directly.