Static Class Structure
Client
Subject interface.
Subject
RealSubject
and Proxy objects.
RealSubject
Proxy
RealSubject object
(realSubject).
RealSubject object.
Subject interface
so that it can act as substitute whenever
a Subject object is expected.
Dynamic Object Collaboration
Client object
works through a Proxy object
that controls the access to a
RealSubject object.
Client object calls
operation()
on the Proxy object.
Proxy
may perform additional functionality
and forwards the request to
the RealSubject object, which performs the request.