27. Proxies and Forwarding
Proxies are objects that stand in for other objects. They are used in any situation where an object is needed but the object is not readily available. For example, when distributed objects are used to provide object-oriented communication between applications, an actual object in one application may be represented as a proxy in another. Messages sent to the proxy are transmitted over the network and received by the actual object. Return values from the actual object are sent back over the network and returned by the proxy.
Forwarding is a feature of the Objective-C runtime that allows an object to capture messages sent to it and then pass these messages on to another object. Proxies use Forwarding in their implementation. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access