RACSubscriber Protocol Reference
| Conforms to | NSObject |
| Declared in | RACSubscriber.h |
Overview
Represents any object which can directly receive values from a RACSignal.
You generally shouldn’t need to implement this protocol. [RACSignal createSignal:], RACSignal’s subscription methods, or RACSubject should work for most uses.
Implementors of this protocol may receive messages and values from multiple threads simultaneously, and so should be thread-safe. Subscribers will also be weakly referenced so implementations must allow that.
Tasks
-
– sendNext:required method -
– sendError:required method -
– sendCompletedrequired method -
– didSubscribeWithDisposable:required method
Instance Methods
didSubscribeWithDisposable:
Sends the subscriber a disposable that represents one of its subscriptions.
- (void)didSubscribeWithDisposable:(RACDisposable *)disposableDiscussion
A subscriber may receive multiple disposables if it gets subscribed to multiple signals; however, any error or completed events must terminate all subscriptions.
Declared In
RACSubscriber.hsendCompleted
Send completed to subscribers.
- (void)sendCompletedDiscussion
This terminates the subscription, and invalidates the subscriber (such that it cannot subscribe to anything else in the future).
Declared In
RACSubscriber.h