© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
V. SarcarJava Design Patternshttps://doi.org/10.1007/978-1-4842-7971-7_8

8. Proxy Pattern

Vaskaran Sarcar1  
(1)
Garia, Kolkata, India
 

This chapter covers the Proxy pattern.

GoF Definition

It provides a surrogate or placeholder for another object to control access to it.

Concept

There are situations where you want to restrict direct communication between an intended object and the outside world. There are various reasons for this. For example, you may be promoting additional securities, you need to improve the response time, you may have some resource constraints, or the final product is still in the development phase.

Proxies can be of different types, but fundamentally ...

Get Java Design Patterns: A Hands-On Experience with Real-World Examples 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.