MCPcopy Create free account
hub / github.com/RefactoringGuru/design-patterns-python / Mediator

Class Mediator

src/Mediator/Conceptual/main.py:19–31  ·  view source on GitHub ↗

EN: The Mediator interface declares a method used by components to notify the mediator about various events. The Mediator may react to these events and pass the execution to other components. RU: Интерфейс Посредника предоставляет метод, используемый компонентами для уведомлени

Source from the content-addressed store, hash-verified

17
18
19class Mediator(ABC):
20 """
21 EN: The Mediator interface declares a method used by components to notify
22 the mediator about various events. The Mediator may react to these events
23 and pass the execution to other components.
24
25 RU: Интерфейс Посредника предоставляет метод, используемый компонентами для
26 уведомления посредника о различных событиях. Посредник может реагировать на
27 эти события и передавать исполнение другим компонентам.
28 """
29
30 def notify(self, sender: object, event: str) -> None:
31 pass
32
33
34class ConcreteMediator(Mediator):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected