Diffusion Apple API
6.10.4
Unified Client Library for iOS, tvOS and OS X / macOS
|
Extension adding support to the Topic Update feature for updating topics with binary values.
- (void) addWithPath: | (NSString *) | path | |
specification: | (PTDiffusionTopicSpecification *) | specification | |
andSetToBinaryValue: | (PTDiffusionBinary *) | value | |
completionHandler: | (PTDiffusionTopicCreationResult *_Nullable) | result | |
(NSError *_Nullable error) | completionHandler | ||
Ensures a topic exists and sets it to a binary value.
If a topic does not exist at the path, one will be created using the specification. If a topic does exist, its specification must match specification, otherwise the operation will fail.
In other respects this method works in the same way as setWithPath:toBinaryValue:completionHandler:.
path | The path of the topic. |
value | The value. |
specification | The required specification of the topic. |
completionHandler | Block to be called asynchronously on success or failure. If the operation was successful, the error argument passed to the block will be nil and result will be non-nil . The completion handler will be called asynchronously on the main dispatch queue. |
NSInvalidArgumentException | If any argument is nil or if the topic type defined in the specification is incompatible with binary (PTDiffusionDataTypes). |
Extends class PTDiffusionTopicUpdateFeature.
- (void) addWithPath: | (NSString *) | path | |
specification: | (PTDiffusionTopicSpecification *) | specification | |
andSetToBinaryValue: | (PTDiffusionBinary *) | value | |
constraint: | (PTDiffusionUpdateConstraint *) | constraint | |
completionHandler: | (PTDiffusionTopicCreationResult *_Nullable) | result | |
(NSError *_Nullable error) | completionHandler | ||
Ensures a topic exists and sets it to a binary value if a constraint is satisfied.
If a topic does not exist at the path, one will be created using the specification. If a topic does exist, its specification must match specification, otherwise the operation will fail.
In other respects this method works in the same way as setTopicWithPath:toBinaryValue:constraint:completionHandler:.
path | The path of the topic. |
specification | The required specification of the topic. |
value | The value. |
constraint | The constraint that must be satisfied for the topic to be updated. |
completionHandler | Block to be called asynchronously on success or failure. If the operation was successful, the error argument passed to the block will be nil and result will be non-nil . The completion handler will be called asynchronously on the main dispatch queue. |
NSInvalidArgumentException | If any argument is nil or if the topic type defined in the specification is incompatible with binary (PTDiffusionDataTypes). |
Extends class PTDiffusionTopicUpdateFeature.
- (PTDiffusionBinaryUpdateStream *) binaryUpdateStreamWithPath: | (NSString *) | path |
Creates an update stream to use for updating a specific topic with binary values.
Update streams send a sequence of updates for a specific topic. The updates may be delivered to the server as binary deltas. They do not provide exclusive access to the topic. If exclusive access is required update streams should be used with session locks as constraints.
Streams are validated lazily when the first 'set' or 'validate' operation is completed. Once validated a stream can be invalidated, after which it rejects future updates.
path | The path of the topic. |
NSInvalidArgumentException | If any argument is nil . |
Extends class PTDiffusionTopicUpdateFeature.
- (PTDiffusionBinaryUpdateStream *) binaryUpdateStreamWithPath: | (NSString *) | path | |
constraint: | (PTDiffusionUpdateConstraint *) | constraint | |
Creates an update stream to use for updating a specific topic with binary values if a constraint is satisfied.
Update streams send a sequence of updates for a specific topic. The updates may be delivered to the server as binary deltas. They do not provide exclusive access to the topic. If exclusive access is required update streams should be used with session locks as constraints.
Streams are validated lazily when the first 'set' or 'validate' operation is completed. Once validated a stream can be invalidated, after which it rejects future updates.
path | The path of the topic. |
constraint | The constraint that must be satisfied for the update stream to be validated. |
NSInvalidArgumentException | If any argument is nil . |
Extends class PTDiffusionTopicUpdateFeature.
- (PTDiffusionBinaryUpdateStream *) binaryUpdateStreamWithPath: | (NSString *) | path | |
specification: | (PTDiffusionTopicSpecification *) | specification | |
Creates an update stream to use for creating and updating a specific topic with binary values.
Update streams send a sequence of updates for a specific topic. The updates may be delivered to the server as binary deltas. They do not provide exclusive access to the topic. If exclusive access is required update streams should be used with session locks as constraints.
Streams are validated lazily when the first 'set' or 'validate' operation is completed. Once validated a stream can be invalidated, after which it rejects future updates.
path | The path of the topic. |
specification | The required specification of the topic. |
NSInvalidArgumentException | If any argument is nil or if the topic type defined in the specification is incompatible with binary (PTDiffusionDataTypes). |
Extends class PTDiffusionTopicUpdateFeature.
- (PTDiffusionBinaryUpdateStream *) binaryUpdateStreamWithPath: | (NSString *) | path | |
specification: | (PTDiffusionTopicSpecification *) | specification | |
constraint: | (PTDiffusionUpdateConstraint *) | constraint | |
Creates an update stream to use for creating and updating a specific topic with binary values if a constraint is satisfied.
Update streams send a sequence of updates for a specific topic. The updates may be delivered to the server as binary deltas. They do not provide exclusive access to the topic. If exclusive access is required update streams should be used with session locks as constraints.
Streams are validated lazily when the first 'set' or 'validate' operation is completed. Once validated a stream can be invalidated, after which it rejects future updates.
path | The path of the topic. |
specification | The required specification of the topic. |
constraint | The constraint that must be satisfied for the update stream to be validated. |
NSInvalidArgumentException | If any argument is nil or if the topic type defined in the specification is incompatible with binary (PTDiffusionDataTypes). |
Extends class PTDiffusionTopicUpdateFeature.
- (void) setWithPath: | (NSString *) | path | |
toBinaryValue: | (PTDiffusionBinary *) | value | |
completionHandler: | (NSError *_Nullable error) | completionHandler | |
Sets a topic to a specified binary value.
path | The path of the topic. |
value | The value. |
completionHandler | Block to be called asynchronously on success or failure. If the operation was successful, the error argument passed to the block will be nil . The completion handler will be called asynchronously on the main dispatch queue. |
NSInvalidArgumentException | If any argument is nil . |
Extends class PTDiffusionTopicUpdateFeature.
- (void) setWithPath: | (NSString *) | path | |
toBinaryValue: | (PTDiffusionBinary *) | value | |
constraint: | (PTDiffusionUpdateConstraint *) | constraint | |
completionHandler: | (NSError *_Nullable error) | completionHandler | |
Sets a topic to a specified binary value if a constraint is satisfied.
path | The path of the topic. |
value | The value. |
constraint | The constraint that must be satisfied for the topic to be updated. |
completionHandler | Block to be called asynchronously on success or failure. If the operation was successful, the error argument passed to the block will be nil . The completion handler will be called asynchronously on the main dispatch queue. |
NSInvalidArgumentException | If any argument is nil . |
Extends class PTDiffusionTopicUpdateFeature.