Interface IValueStream<TValue>
The stream interface that can be registered to subscription and value events whenever an update is received from the server.
Inherited Members
Namespace: PushTechnology.ClientInterface.Client.Features.Topics
Assembly: Diffusion.Client.dll
Syntax
public interface IValueStream<in TValue> : ISubscriberStream, IStream, ICallback
Type Parameters
Name | Description |
---|---|
TValue | The value type. |
Remarks
A stream implementation can be registered using 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 AddFallbackStream<TValue>(IValueStream<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 SESSION_CLOSED.
See ITopics class documentation for further details of the use of value streams.
Methods
OnValue(String, ITopicSpecification, TValue, TValue)
Notifies an update to a topic value from the server.
Declaration
void OnValue(string topicPath, ITopicSpecification specification, TValue oldValue, TValue newValue)
Parameters
Type | Name | Description |
---|---|---|
String | topicPath | The topic path. |
ITopicSpecification | specification | The topic specification. |
TValue | oldValue | The previous value, which may be null if this is the first value. |
TValue | newValue | The new value derived from the last update received from the server. |
Remarks
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.