Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Proxy pattern
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Structure== === UML class and sequence diagram === [[File:w3sDesign Proxy Design Pattern UML.jpg|frame|none|A sample UML class and sequence diagram for the Proxy design pattern. <ref>{{cite web|title=The Proxy design pattern - Structure and Collaboration|url=http://w3sdesign.com/?gr=s07&ugr=struct|website=w3sDesign.com|access-date=2017-08-12}}</ref>]] In the above [[Unified Modeling Language|UML]] [[class diagram]], the <code>Proxy</code> class implements the <code>Subject</code> interface so that it can act as substitute for <code>Subject</code> objects. It maintains a reference (<code>realSubject</code>) to the substituted object (<code>RealSubject</code>) so that it can forward requests to it (<code>realSubject.operation()</code>). The sequence diagram shows the run-time interactions: The <code>Client</code> object works through a <code>Proxy</code> object that controls the access to a <code>RealSubject</code> object. In this example, the <code>Proxy</code> forwards the request to the <code>RealSubject</code>, which performs the request. === Class diagram === [[File:proxy_pattern_diagram.svg|frame|none|Proxy in [[Unified Modeling Language|UML]]]] [[File:Proxy pattern in LePUS3.gif|frame|none|Proxy in [[Lepus3|LePUS3]] ([https://web.archive.org/web/20180314162121/http://www.lepus.org.uk/ref/legend/legend.xml legend])]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)