A UML class diagram for the Proxy pattern
We will now discuss the Proxy pattern with the help of the following UML diagram. As we discussed in the previous paragraph, the Proxy pattern has three main actors: the production house, Agent
, and the Actor
. Let's put these in a UML diagram and see how the classes look:
As we observe the UML diagram, you'll realize that there are three main participants in this pattern:
Proxy
: This maintains a reference that lets theProxy
access the real object. It provides an interface identical to theSubject
so thatProxy
can substitute the real subject. Proxies are also responsible for creating and deleting theRealSubject ...
Get Python: Master the Art of Design Patterns now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.