Chapter 18. Provider/Subscriber Pattern

The provider/subscriber pattern defines a one-to-many, unidirectional flow of information from a provider object to any number of subscriber objects. The concept is that the provider has useful information or events that need to be communicated to other objects, its subscribers, which will use that information to perform additional actions or stay in synchronization with the provider. In Java parlance, the provider fires notifications to its listeners. In Objective-C terminology, the provider posts notifications to its observers.

The provider/subscriber pattern is used heavily in Java, but Java doesn't provide any intrinsic service for helping objects manage their subscribers or coordinate messages. Consequently, ...

Get Learn Objective-C for Java Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.