V - the value classpublic static interface Topics.ValueStream<V> extends Topics.SubscriberStream
A stream implementation can be registered using
addStream. 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.
Fallback streams will receive events for all topics that are not selected
by other streams the session has registered using addStream.
If the stream is removed,
onClose will be called.
If the session is closed,
onError will be called with ErrorReason.SESSION_CLOSED.
See Topics class documentation for further details of the use of
value streams.
| Modifier and Type | Interface and Description |
|---|---|
static class |
Topics.ValueStream.Default<V>
Default
Topics.ValueStream implementation. |
| Modifier and Type | Method and Description |
|---|---|
void |
onValue(String topicPath,
TopicSpecification specification,
V oldValue,
V newValue)
Notifies an update to a topic value from the server.
|
onSubscription, onUnsubscriptionvoid onValue(String topicPath, TopicSpecification specification, V oldValue, V newValue)
This is also called to provide the current value for any matching topic that the session is already subscribed to when the stream is added.
topicPath - the topic pathspecification - the topic specificationoldValue - the previous value. Will be null for the initial call
to onValue for a topic. It can also be null if the topic's
data type supports null values.newValue - the new value derived from the last update received
from the server. It can be null if the topic's data type
supports null values.Copyright © 2024 DiffusionData Limited. All rights reserved.