(a) What is it? What?
①: Definition:
②: Features: 1.0 proxy class (intermediate suitor), with the same interface as the delegate class (suitor);
2.0 proxy class ---> is mainly responsible for preprocessing messages for the delegate class , filtering the message, passing the message to the delegate class, processing the message afterwards, and so on. "Similar: Help others chase a girlfriend, inquire the news".
3.0 There is usually a correlation between the proxy class and the delegate class "Like a buddy." An object of a proxy class is associated with an object of a delegate class . The proxy class itself does not actually implement the service , but rather by invoking the method of the delegate class to provide a particular service. " the kind of Guy who likes to chase is doing things according to the demands of the girl's buddies ."
③: Category: 1.0 static Agents:
2.0 Dynamic Agents:
(b) Why? Why
(c) Where is it used? where
(d) What to do? How?
Proxy mode (dynamic proxy for Java)