Mediator
Usage
- Defines simplified communication between classes
- Defines an object that encapsulates how a set of objects interact
- Promotes loose coupling by keeping objects from referring to each other explicitly
- Varies their interaction independently
Diagram
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
Resources URL:
notes/design_patterns/resources
Sources URL:
notes/design_patterns/sources
