Proxy mode is a common Java design pattern, his characteristic is that the proxy class and the delegate class have the same interface, the proxy class is mainly responsible for the delegate class preprocessing messages, filtering messages, forwarding messages to the delegate class, and post-processing messages. There is usually an association between the proxy class and the delegate class, and the object of a proxy class is associated with an object of a delegate class, and the object of the proxy class does not actually implement the service, but instead provides a specific service by invoking the related method of the object of the delegate class.
Proxy other classes of methods, you can add their own logic before and after the proxy method, about the dynamic proxy design mode is likely to be used unconsciously, such as the aop,struts2 in spring, such as interceptors.
According to the code, the dynamic proxy implementation is based on the reflection mechanism of java.
Reference: Java dynamic Agents (JDK and Cglib)
The proxy mode of Java design pattern