Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InvalidUnsetStream

An update stream delegate that is used after the update stream has encountered an invalid operation and a value was not set.

Hierarchy

  • InvalidUnsetStream

Implements

Index

Constructors

constructor

  • Create a new InvalidUnsetStream instance

    Parameters

    • err: Error

      the error that occurred

    Returns InvalidUnsetStream

Properties

Private Readonly err

err: Error

The error that occurred

Methods

get

  • get(): void
  • Return the latest value of the topic set using this update stream.

    The returned value reflects the last value that has been set, before it is sent to the server.

    If the server rejects a set operation, the topic value will not change and this update stream will be invalidated.

    This method will throw an Error if called before the first call to set

    Returns void

    the cached value of the topic

onSetComplete

  • onSetComplete(): void
  • inheritdoc

    Returns void

onSetFailed

  • onSetFailed(): void
  • inheritdoc

    Returns void

onValidateComplete

  • onValidateComplete(): void
  • inheritdoc

    Returns void

onValidateFailed

  • onValidateFailed(): void
  • inheritdoc

    Returns void

set

  • set(): Promise<never>
  • inheritdoc

    Returns Promise<never>

validate

  • validate(): Promise<never>
  • Validates the update stream.

    Update streams are validated lazily when setting the value. This method allows the stream to be validated before a value needs to be set.

    If the update stream has not been validated yet, calling this method checks the topic exists, the topic type is correct, the constraint is satisfied and the session has permission to update the topic. Once it has been validated calling this method checks the topic has not been removed, no other stream has been created for the topic, the value of the topic has not been changed by anything else and the session still has permission to update the topic. If validation fails, the Promise will resolve with an Error.

    If this method fails all subsequent calls to set or validate will resolve with an Error.

    Returns Promise<never>

    a Promise that completes when a response is received from the server.

Copyright © 2025 DiffusionData Ltd. All Rights Reserved.