The aim behind asking this question is to improve my understanding of Java Proxies and delegation in general.
The aim behind asking this question is to improve my understanding of Java Proxies
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Semantically a Proxy delegates to some implementation, but that is just a side effect of the intention of the Proxy Pattern.
The intention is to intercept and do extra logic or modify the logic before it does the delegation, or possibly affect the return value before the Proxy returns the results.
The interception and modification isn’t the intention of the Delegate Pattern.
There it is an abstraction to make an interface in the system loosely coupled from the implementation.
There is a concept of Dynamic Proxies in Java which are Java specific, and their intention is for building Adapter Pattern and Decorator Pattern implemenations.