mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-13 22:16:03 +00:00
docs: diagrams for servant and server session
This commit is contained in:
1 parent
30d6875aa1
commit
b8f38691f3
4 files changed
+8
No files matched your search
@@ -34,6 +34,10 @@ Wikipedia says
|
||||
|
||||
> In software engineering, the servant pattern defines an object used to offer some functionality to a group of classes without defining that functionality in each of them. A Servant is a class whose instance (or even just class) provides methods that take care of a desired service, while objects for which (or with whom) the servant does something, are taken as parameters.
|
||||
|
||||
Sequence diagram
|
||||
|
||||

|
||||
|
||||
## Programmatic Example of Servant Pattern in Java
|
||||
|
||||
The Servant design pattern is a behavioral design pattern that defines a class that provides some sort of service to a group of classes. This pattern is particularly useful when these classes lack some common functionality that can't be added to the superclass. The Servant class brings this common functionality to a group of classes.
|
||||
|
||||
Reference in new issue
Block a user