Diffusion .NET Client Library
6.1.5
|
Represents a topic updater that provides methods for an update source to update topics. More...
Inherited by PushTechnology.ClientInterface.Client.Features.Control.Topics.IBytesUpdater.
Public Member Functions | |
IValueUpdater< TValue > | ValueUpdater< TValue > () |
Returns an updater that can be used for a specified data type to apply value updates. More... | |
void | Update (string topicPath, IBytes data, ITopicUpdaterUpdateCallback callback) |
Updates a topic with a IBytes. More... | |
void | Update< TContext > (string topicPath, IBytes data, TContext context, ITopicUpdaterUpdateContextCallback< TContext > callback) |
Updates a topic with a given context. More... | |
void | Update (string topicPath, IUpdate update, ITopicUpdaterUpdateCallback callback) |
Updates a topic. More... | |
void | Update< TContext > (string topicPath, IUpdate update, TContext context, ITopicUpdaterUpdateContextCallback< TContext > callback) |
Updates a topic with a given context. More... | |
void | Update (string topicPath, string data, ITopicUpdaterUpdateCallback callback) |
Updates a topic. More... | |
void | Update< TContext > (string topicPath, string data, TContext context, ITopicUpdaterUpdateContextCallback< TContext > callback) |
Updates a topic with a given context. More... | |
Represents a topic updater that provides methods for an update source to update topics.
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 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 will be called.
Since 5.1
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ITopicUpdater.Update | ( | string | topicPath, |
IBytes | data, | ||
ITopicUpdaterUpdateCallback | callback | ||
) |
Updates a topic with a IBytes.
The value supplied must be a value compatible with the type of topic being updated. For example, for a TopicType.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}.
For TopicType.RECORD or TopicType.SINGLE_VALUE topics a IContent object can be suplied and this is equivalent to supplying an IUpdate created using IContentUpdateFactory.Update(IContent) to Update(string,IUpdate,ITopicUpdaterUpdateCallback).
topicPath | The topic to update. |
data | The data to use for the update. |
callback | The callback for notifications on the update request. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ITopicUpdater.Update | ( | string | topicPath, |
IUpdate | update, | ||
ITopicUpdaterUpdateCallback | callback | ||
) |
Updates a topic.
Subscribers will be notified of the change to the topic state in a manner appropriate to the topic type.
Updates may be created using a suitable IUpdateFactory. The ITopicUpdateControl.UpdateFactory{TFactory} method may be used to obtain an instance of the factory required.
topicPath | The topic to update. |
update | The details of the update to be performed. |
callback | The callback for notifications on the update request. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ITopicUpdater.Update | ( | string | topicPath, |
string | data, | ||
ITopicUpdaterUpdateCallback | callback | ||
) |
Updates a topic.
This is a convenience method which is equivalent to supplying an IUpdate created using IContentUpdateFactory.Update(IContent) with content created using IContentFactory.NewContent(string) to Update(string,IUpdate,ITopicUpdaterUpdateCallback).
Since 5.3
topicPath | The topic to update. |
data | The string data to use for the update. |
callback | The callback for notifications on the update request. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ITopicUpdater.Update< TContext > | ( | string | topicPath, |
IBytes | data, | ||
TContext | context, | ||
ITopicUpdaterUpdateContextCallback< TContext > | callback | ||
) |
Updates a topic with a given context.
This is a convenience method which is equivalent to supplying an IUpdate created using IContentUpdateFactory.Update(IContent) to Update{TContext}(string,IUpdate,TContext,ITopicUpdaterUpdateContextCallback{TContext}).
TContext | The context type. |
topicPath | The topic to update. |
data | The data to use for the update. |
context | The context to supply to callback notifications. May be null. |
callback | The callback for notifications on the update request. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ITopicUpdater.Update< TContext > | ( | string | topicPath, |
IUpdate | update, | ||
TContext | context, | ||
ITopicUpdaterUpdateContextCallback< TContext > | callback | ||
) |
Updates a topic with a given context.
Subscribers will be notified of the change to the topic state in a manner appropriate to the topic type.
Updates may be created using a suitable IUpdateFactory. The ITopicUpdateControl.UpdateFactory{TFactory} method may be used to obtain an instance of the factory required.
TContext | The context type. |
topicPath | The topic to update. |
update | The content to use for the update. |
context | The context to supply to callback notifications. May be null. |
callback | The callback for notifications on the update request. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ITopicUpdater.Update< TContext > | ( | string | topicPath, |
string | data, | ||
TContext | context, | ||
ITopicUpdaterUpdateContextCallback< TContext > | callback | ||
) |
Updates a topic with a given context.
This is a convenience method which is equivalent to supplying an IUpdate created using IContentUpdateFactory.Update(IContent) with content created using IContentFactory.NewContent(string) to Update{TContext}(string,IUpdate,TContext,ITopicUpdaterUpdateContextCallback{TContext}).
Since 5.3
TContext | The context type. |
topicPath | The topic to update. |
data | The string data to use for the update. |
context | The context to supply to callback notifications. May be null. |
callback | The callback for notifications on the update request. |
IValueUpdater<TValue> PushTechnology.ClientInterface.Client.Features.Control.Topics.ITopicUpdater.ValueUpdater< TValue > | ( | ) |
Returns an updater that can be used for a specified data type to apply value updates.
Since 5.8
TValue | The value type. This must correspond to the IDataType{TValue} of the topic type of topics that are to be updated using the updater. For example, for a JSON topic this would be specified as IJSON. |