Interface ITopicUpdater
Represents a topic updater that provides methods for an ITopicUpdateSource to update topics.
Namespace: PushTechnology.ClientInterface.Client.Features.Control.Topics
Assembly: Diffusion.Client.dll
Syntax
public interface ITopicUpdater
Remarks
Deprecated: The ITopicUpdateControl feature has been replaced by the ITopicUpdate feature and will be removed in a future release. The ITopicUpdate feature provides equivalent and additional functionality, such as conditional updates.
An Updater can be used to send any number of updates. The topics that may be updated are determined by the topic path used to register the parent ITopicUpdateSource.
A successful update will result in OnSuccess() being called.
Should an update fail, OnError(ErrorReason) will be called with an ErrorReason value indicating the cause of the problem.
If the Updater is used when it's in an invalid state, such as when the parent ITopicUpdateSource enters a standby or closed state, OnError(ErrorReason) will be called.
Since 5.1
Methods
Update(String, IBytes, ITopicUpdaterUpdateCallback)
Updates a topic with a IBytes.
Declaration
void Update(string topicPath, IBytes data, ITopicUpdaterUpdateCallback callback)
Parameters
Type | Name | Description |
---|---|---|
String | topicPath | The topic to update. |
IBytes | data | The data to use for the update. |
ITopicUpdaterUpdateCallback | callback | The callback for notifications on the update request. |
Remarks
The value supplied must be a value compatible with the type of topic being updated. For example, for a JSON topic, the data should be a IJSON value.
Note: this method does not cache values and so should never be used to update a topic that is also being updated using a ValueUpdater<TValue>().
Update<TContext>(String, IBytes, TContext, ITopicUpdaterUpdateContextCallback<TContext>)
Updates a topic with a given context.
Declaration
void Update<TContext>(string topicPath, IBytes data, TContext context, ITopicUpdaterUpdateContextCallback<TContext> callback)
Parameters
Type | Name | Description |
---|---|---|
String | topicPath | The topic to update. |
IBytes | data | The data to use for the update. |
TContext | context | The context to supply to callback notifications. May be null. |
ITopicUpdaterUpdateContextCallback<TContext> | callback | The callback for notifications on the update request. |
Type Parameters
Name | Description |
---|---|
TContext | The context type. |
ValueUpdater<TValue>()
Returns an updater that can be used for a specified data type to apply value updates.
Declaration
IValueUpdater<TValue> ValueUpdater<TValue>()
Returns
Type | Description |
---|---|
IValueUpdater<TValue> | The updater for the given value type. |
Type Parameters
Name | Description |
---|---|
TValue | The value type. This must correspond to the IDataType<TValue> of the TopicType of topics that are to be updated using the updater. For example, for a JSON topic this would be specified as IJSON. |
Remarks
Since 5.8