- Hands-On Design Patterns with Java
- Dr. Edward Lavieri
- 90字
- 2021-06-24 14:58:09
Use case
To demonstrate the mediator design pattern, we will emulate a widget production system that includes a hopper for parts, a starter to start the system, an assembly system to combine hopper components, an accelerator, and an emergency break to manage the speed of the system.
There are inter-relations between the various components for our mediator to manage. These inter-relationships are detailed here:
Widget production system inter-relationships
As you can see from the table, there are 16 inter-relationships among the 5 system components for the mediator to manage.