class: center, middle # Proxy --- # Also known as * Surrogate --- # Intent * Provide a surrogate or placeholder for another object to control access to it. --- # Applicability * Protection proxy limits access to the real subject. * Virtual proxies are used when an object is expensive to instantiate. * Caching proxies are used to cache expensive calls to the real subject. * Remote proxies are used in distributed object communication. * Smart proxies are used to implement reference counting and log calls to the object. --- # Diagram .center[![Alt text](proxy-concept.png)] --- # Tutorials * Blog http://java-design-patterns.com/blog/controlling-access-with-proxy-pattern/ * Source code http://java-design-patterns.com/patterns/proxy/