Mediator
Usage
- Defines simplified communication between classes
- Define an object that encapsulates how a set of objects interact
- Promote loose coupling by keeping objects from referring to each other explicitly
- Vary their interaction independently
Participants
Mediator
ConcreteMediator
- Defines an interface for communicating with Colleague objects
Colleague classes
- Implements cooperative behavior by coordinating Colleague objects
- Knows and maintains its colleagues
- Each Colleague class knows its Mediator object
- Each colleague communicates with its mediator whenever it would have otherwise communicated with another colleague
