Diffusion Apple API  6.2.0
Unified Client Library for iOS, tvOS and OS X / macOS
 All Classes Functions Variables Properties Pages
Instance Methods | List of all members
<PTDiffusionSubscriberStreamDelegate> Protocol Reference

Introduction

Methods implemented by classes handling streamed subscription events for value topics.

This protocol defines methods to be implemented by classes wishing to receive streamed subscription events.

See Also
PTDiffusionTopicsFeature
Since
5.9
Inheritance diagram for <PTDiffusionSubscriberStreamDelegate>:
<PTDiffusionStreamDelegate> <PTDiffusionBinaryTimeSeriesEventValueStreamDelegate> <PTDiffusionBinaryValueStreamDelegate> PTDiffusionDefaultSubscriberStreamDelegate <PTDiffusionJSONTimeSeriesEventValueStreamDelegate> <PTDiffusionJSONValueStreamDelegate> <PTDiffusionNumberTimeSeriesEventValueStreamDelegate> <PTDiffusionNumberValueStreamDelegate> <PTDiffusionRecordV2TimeSeriesEventValueStreamDelegate> <PTDiffusionRecordV2ValueStreamDelegate> <PTDiffusionStringTimeSeriesEventValueStreamDelegate> <PTDiffusionStringValueStreamDelegate>

Instance Methods

(void) - diffusionStream:didSubscribeToTopicPath:specification:
 
(void) - diffusionStream:didUnsubscribeFromTopicPath:specification:reason:
 
- Instance Methods inherited from <PTDiffusionStreamDelegate>
(void) - diffusionStream:didFailWithError:
 
(void) - diffusionDidCloseStream:
 

Method Documentation

- (void) diffusionStream: (PTDiffusionStream *)  stream
didSubscribeToTopicPath: (NSString *)  topicPath
specification: (PTDiffusionTopicSpecification *)  specification 

Subscription notification.

This method is called when a session is subscribed to a topic that matches the stream registration. This method is also called when a stream is added, for all of the session's subscriptions to topics that match the stream registration.

For a given topic, this will be the initial notification, and the first notification following an unsubscription notification if the session re-subscribes to the topic.

This method is also called for fallback streams that match the topic type when the session removes the last stream that selected a subscribed topic. The fallback stream will now receive updates for the topic, starting with an immediate notification of the currently cached value (if any).

Parameters
streamThe stream that received the update.
topicPathThe topic path to which the session has been subscribed.
specificationThe specification for the subscribed topic.
Since
5.9
- (void) diffusionStream: (PTDiffusionStream *)  stream
didUnsubscribeFromTopicPath: (NSString *)  topicPath
specification: (PTDiffusionTopicSpecification *)  specification
reason: (PTDiffusionTopicUnsubscriptionReason)  reason 

Unsubscription notification.

This method is called if the session is unsubscribed from a topic that matches the stream registration. The stream will receive no more updates for the topic unless the session re-subscribes to the topic.

This method is also called for fallback streams that match the topic type if the session adds the first stream that selects a subscribed topic. For these notifications, the reason will be PTDiffusionTopicUnsubscriptionReason_StreamChange. The fallback stream will no longer receive updates for the topic.

Parameters
streamThe stream that received the update.
topicPathThe topic path from which the session has been unsubscribed.
specificationThe specification for the unsubscribed topic.
reasonThe reason for the unsubscription.
Since
5.9