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 occurs most frequently when an object takes a long time to load 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 the request 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.

Get Design Patterns Java™ Workbook 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.