The PROXY Design Pattern Oleksandra Sopova Feb, 2014
Remote method invocation
Back to our GumballMachine remote proxy
In our dating service we want : - make sure that a customer can set his own information while preventing others from altering it -allow just the opposite with the HotOrNot ratings: we want the other customers to be able to set the rating, but not that particular customer
Big Picture: creating a dynamic Proxy for the PersonBean Step one: creating Invocation Handlers
The Proxy Zoo
Summary The Proxy pattern introduces a level of indirection when accessing an object. A remote proxy can hide the fact that an object resides in a different address Space. A virtual proxy can perform optimizations such as creating an object on Demand. Both protection proxies and smart references allow additional housekeeping tasks when an object is accessed.
References Head First Design Patterns by Eric Freeman, Elisabeth Robson, Bert Bates, Kathy Sierra Design Patterns: Elements of Reusable Object- Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides Design Patterns by Andriy Buday RMI (Remote Method Invocation)
THANK YOU FOR YOUR ATTENTION