Table of Contents

Interface IValueStream<TValue>

Namespace
PushTechnology.ClientInterface.Client.Features.Topics
Assembly
Diffusion.Client.dll

The stream interface that can be registered to receive subscription and value events whenever an update is received from the server.

public interface IValueStream<in TValue> : ISubscriberStream, IStream, ICallback

Type Parameters

TValue

The value type.

Inherited Members

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

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.

void OnValue(string topicPath, ITopicSpecification specification, TValue oldValue, TValue newValue)

Parameters

topicPath string

The topic path.

specification ITopicSpecification

The topic specification.

oldValue TValue

The previous value, which may be null if this is the first value.

newValue TValue

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.