Proxy pattern: Difference between revisions

Content deleted Content added
Undid revision 1226848816 by 103.38.198.154 (talk)
Tags: Mobile edit Mobile web edit
Line 19:
 
Define a separate <code>Proxy</code> object that
* can be used as a substitute for another object (<code>Subject</code>), and
* implements additional functionality to control the access to this subject.
 
This makes it possible to work through a <code>Proxy</code> object to perform additional functionality when accessing a subject. For example, tolike checkchecking the access rights of clients accessing a sensitive object.
 
To act as a substitute for a subject, a proxy must implement the <code>Subject</code> interface. Clients can't tell whether they work with a subject or its proxy.
Clients can't tell whether they work with a subject or its proxy.
See also the UML class and sequence diagram below.