Understand proxy mode

1. to provide a proxy to control access to the object to other objects.
2. proxied objects and proxy objects inherit the same interface, the proxy object holds methods proxy object.
3. The proxy mode to create a proxy object to replace the real object, the client get this proxy object, the client has not affected, just like the real object is to use the same
time 4. When the client proxy object of this operation, the actual functionally there are real objects to complete, but is operated by proxy, that is, the client operating agents, agents operating a real object.
5. Because the proxy object sandwiched between the client and the agent's real object, then this can be done in between a lot of things, such as determining authority.

Guess you like

Origin blog.csdn.net/weixin_39507514/article/details/88778805