Chapter 11. Proxy
An ordinary object does its own work in support of the public interface that it advertises. It can happen, though, that a legitimate object cannot live up to this ordinary responsibility. This may occur when an object takes a long time to load, when you need to intercept messages to the object, or when the object is running on another computer. In these cases, a proxy object can take the responsibility that a client expects and forward requests appropriately to an underlying target object. The intent of the PROXY pattern is to provide a surrogate or placeholder for another object to control access to it.
A Simple Proxy
A proxy object usually has an interface that is nearly identical to the interface of the object for which it is ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access