Diffusion .NET Client Library
6.1.5
|
The stream interface that can be registered to subscription and value events whenever an update is received from the server. More...
Public Member Functions | |
void | OnValue (string topicPath, ITopicSpecification specification, TValue oldValue, TValue newValue) |
Notifies an update to a topic value from the server. More... | |
The stream interface that can be registered to subscription and value events whenever an update is received from the server.
A stream implementation can be registered using ITopics.AddStream{TValue}(ITopicSelector,IValueStream{TValue}). The stream will receive events for the topics that are selected by the topic selector and have a type compatible with.
A stream implementation can also be registered as a fallback stream using ITopics.AddFallbackStream{TValue}. Fallback streams will receive events for all topics that are not selected by other streams the session has registered using AddStream or AddTopicStream.
If the stream is removed, OnClose will be called.
If the session is closed, OnError will be called with ErrorReason.SESSION_CLOSED.
See ITopics class documentation for further details of the use of value streams.
TValue | The value type. |
void PushTechnology.ClientInterface.Client.Features.Topics.IValueStream< in TValue >.OnValue | ( | string | topicPath, |
ITopicSpecification | specification, | ||
TValue | oldValue, | ||
TValue | newValue | ||
) |
Notifies an update to a topic value from the server.
topicPath | The topic path. |
specification | The topic specification. |
oldValue | The previous value, which may be null if this is the first value. |
newValue | The new value derived from the last update received from the server. |
This is also called to provide the current value for any matching topic that the client is already subscribed to when the stream is added.
Implemented in PushTechnology.ClientInterface.Client.Features.Topics.DefaultValueStream< TValue >.