Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UpdateStreamFactory

A factory for creating UpdateStreams

Hierarchy

  • UpdateStreamFactory

Index

Constructors

constructor

  • Create a new UpdateStreamFactory

    Parameters

    Returns UpdateStreamFactory

Properties

Private Readonly context

Private Readonly streamServices

streamServices: StreamServices

The stream services

Methods

Private binaryDeltaType

  • Get the binary delta type for a given data type

    Parameters

    • dataType: AbstractDataType<any, any, any>

      the data type

    • suppressDeltas: boolean

    Returns BinaryDeltaTypeImpl<any, any, any> | undefined

    the corresponding binary delta type if it exists

createUpdateStream

  • Create an update stream

    This creates an UpdateStreamImpl whose delegate has been set to a NewUpdateStream

    Parameters

    • path: string

      the topic path to add and update

    • dataType: AbstractDataType<any, any, any>

      the data type of the values to update

    • constraint: InternalUpdateConstraint

      the topic update constraint

    • Default value suppressDeltas: boolean = false

    Returns UpdateStreamImpl

    a new update stream

createUpdateStreamThatAddsTopic

  • Create an update stream that adds a topic

    This creates an UpdateStreamImpl whose delegate has been set to a NewAddTopicAndUpdateStream

    Parameters

    • path: string

      the topic path to add and update

    • specification: TopicSpecification

      the topic specification of the topic to add

    • dataType: AbstractDataType<any, any, any>

      the data type of the values to update

    • constraint: InternalUpdateConstraint

      the topic update constraint

    • Default value suppressDeltas: boolean = false

    Returns UpdateStreamImpl

    a new update stream

Private getChangeService

  • Get the command service that can be sent to indicate a change in value

    Parameters

    • deltaType: BinaryDeltaTypeImpl<any, any, any> | undefined

      the delta type

    • suppressDeltas: boolean

    Returns ServiceSender<UpdateStreamRequest, null>

    a ServiceSender that sends a change in value

Private getToBytesFunction

  • Get a function that converts a change in value to a Uint8Array

    Parameters

    Returns (Anonymous function)

    a function for converting values to binary data

Private getValueCheckOperation

  • getValueCheckOperation(dataType: AbstractDataType<any, any, any>): (Anonymous function) | (Anonymous function)
  • Create a function that validates a value

    Parameters

    Returns (Anonymous function) | (Anonymous function)

    a callback that checks a value

Copyright © 2025 DiffusionData Ltd. All Rights Reserved.