Introduction to mediator pattern of Java design pattern
•
Java
The mediator pattern of Java design patterns is one of the behavior patterns. Define a mediation object to encapsulate the interaction between a series of objects. Mediators make objects do not need to explicitly refer to each other, so that their coupling is loose, and their interaction can be changed independently.
As shown in the figure below:
Examples of intermediary modes among producers, consumers and agents:
Operation results:
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码