Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ValueStreamProxy

Internal proxy for Subscriptions with an underlying datatype.

Hierarchy

  • ValueStreamProxy

Implements

Index

Constructors

constructor

Properties

Private Readonly adapterFactory

adapterFactory: AdapterFactory

Private Readonly datatype

datatype: AbstractDataType<any, any, any> | AnyDataTypeImpl

The data type of the value stream

Readonly emitter

emitter: Emitter

The emitter that emits events on the subscription

Private pending

pending: boolean = true

Flag indicating that the stream has not yet been added to the stream registry

Private Readonly registry

registry: StreamRegistry

The stream registry

Readonly subscription

subscription: ValueStreamImpl

The subscription that is returned to the user

Methods

adapter

  • inheritdoc

    Parameters

    Returns StreamAdapter

onDelta

  • onDelta(path: string, specification: TopicSpecification, oldContent: Uint8Array | null, content: Uint8Array, delta: BinaryDelta | null, oldValue: any, newValue: any): void
  • Handle a delta event

    throws

    an InvalidDataError if the value is incompatible with the data type, or buffer does not represent a valid value.

    Parameters

    • path: string

      the topic path

    • specification: TopicSpecification

      the topic specification

    • oldContent: Uint8Array | null

      the buffer containing the old content

    • content: Uint8Array

      the content that was received

    • delta: BinaryDelta | null

      the delta

    • oldValue: any

      the old value

    • newValue: any

      the new value

    Returns void

onOpen

  • onOpen(): void
  • Handle the open event

    Returns void

onSubscription

  • Handle a subscription event

    Parameters

    Returns void

onSubscriptionError

onUnsubscription

  • Handle a subscription event

    Parameters

    Returns void

onValue

  • onValue(path: string, specification: TopicSpecification, oldContent: Uint8Array | null, content: Uint8Array, oldValue: any, newValue: any): void
  • Handle a value event

    throws

    an InvalidDataError if the value is incompatible with the data type, or buffer does not represent a valid value.

    Parameters

    • path: string

      the topic path

    • specification: TopicSpecification

      the topic specification

    • oldContent: Uint8Array | null

      the buffer containing the old content

    • content: Uint8Array

      the content that was received

    • oldValue: any

      the old value

    • newValue: any

      the new value

    Returns void

selects

  • Check if the stream adapter selects a topic specification

    Parameters

    Returns boolean

    true if the adapter matches the specification

Copyright © 2025 DiffusionData Ltd. All Rights Reserved.