docs: add notification diagram

This commit is contained in:
Ilkka Seppälä
2025-04-09 21:27:42 +03:00
parent 15ee32a821
commit f01235b30a
2 changed files with 4 additions and 0 deletions
+4
View File
@@ -32,6 +32,10 @@ In plain words
> The Notification design pattern enables an object to automatically notify a list of interested observers about changes or events without knowing the specifics of the subscribers.
Sequence diagram
![Notification sequence diagram](./etc/notification-sequence-diagram.png)
## Programmatic Example of Notification Pattern in Java
The Java Notification pattern is used to capture information passed between layers, validate the information, and return any errors to the presentation layer if needed. It reduces coupling between the producer and consumer of events, enhances flexibility and reusability of components, and allows for dynamic event subscription and unsubscription.
Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB