20. Invocations
Invocations are a technique for preserving the state of messages, arguments, and return values. Invocations can be used to completely decouple the sender of a message from the receiver. The sender and receiver can be in different processes or separated by time. Invocations are implemented by Cocoa’s NSInvocation class and are used in distributed objects, undo and redo support, and scheduled periodic event processing. Invocations can be used in applications to provide a wide range of flexible and dynamic behavior. Invocations are a generalized implementation of the well-known Command pattern described at http://en.wikipedia.org/wiki/Command_pattern.
Motivation
Provide a means of capturing messages so that they can be stored, ...
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