Diffusion .NET Client Library  6.1.5
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
PushTechnology.ClientInterface.Client.Features.Control.Topics.ITopicUpdater Interface Reference

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...
 

Detailed Description

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

Member Function Documentation

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).

Parameters
topicPathThe topic to update.
dataThe data to use for the update.
callbackThe 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.

Parameters
topicPathThe topic to update.
updateThe details of the update to be performed.
callbackThe 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

Parameters
topicPathThe topic to update.
dataThe string data to use for the update.
callbackThe 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}).

Template Parameters
TContextThe context type.
Parameters
topicPathThe topic to update.
dataThe data to use for the update.
contextThe context to supply to callback notifications. May be null.
callbackThe 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.

Template Parameters
TContextThe context type.
Parameters
topicPathThe topic to update.
updateThe content to use for the update.
contextThe context to supply to callback notifications. May be null.
callbackThe 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

Template Parameters
TContextThe context type.
Parameters
topicPathThe topic to update.
dataThe string data to use for the update.
contextThe context to supply to callback notifications. May be null.
callbackThe 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

Template Parameters
TValueThe 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.
Returns
The updater for the given value type.

The documentation for this interface was generated from the following file: