Options
All
  • Public
  • Public/Protected
  • All
Menu

Diffusion JavaScript API 6.13.0

Index

Enumerations

Classes

Interfaces

Type aliases

Events

Variables

Functions

Object literals

Type aliases

AdapterFactory

AdapterFactory: (stream: StreamAdapter, datatype: DataType<any, any, any> | AnyDataType, topicSpec: TopicSpecification) => StreamAdapter

A factory function for stream adapters

Type declaration

AddOrUpdateType

AddOrUpdateType: ADD_SERVICE | UPDATE_SERVICE

AnonymousConnectionAction

AnonymousConnectionAction: "deny" | "allow" | "abstain"

Action to be taken by the system authentication handler for connection attempts that do not provide a principal name and credentials.

CBORBaseValue

CBORBaseValue: CBORObject | TokenValueType

CBORValue

Callback

Callback<U>: (error: any) => U

An error callback

Type parameters

  • U

Type declaration

    • (error: any): U
    • Parameters

      • error: any

      Returns U

CborTypePredicate

CborTypePredicate: (type: types) => boolean

a predicate for CBOR types

Type declaration

    • Parameters

      Returns boolean

ConfigurationResponseTypes

ConfigurationResponseTypes: GET_CONFIGURATION | GET_SERVICE_CONFIGURATION

ConnectionActivityMonitorFactory

ConnectionActivityMonitorFactory: (connection: Connection, response: ConnectionResponse) => ConnectionActivityMonitor

A factory function for connection activity monitors

Type declaration

ConnectionFactory

ConnectionFactory: (transports: Transports, reconnectTimeout: number, recoveryBufferSize: number) => Connection

A function type that creates a connection

Type declaration

ConnectionOptions

ConnectionOptions: {}

A complete map of ConnectionOptions to values.

Type declaration

ConnectionRequest

Union type for all connection request types

ConversationSetFactory

ConversationSetFactory: () => ConversationSet

Type of the factory function to create a new conversation set

Type declaration

Credentials

Credentials: string | Uint8Array | null | undefined

The credentials that a session uses to authenticate itself.

Deregistration

Deregistration<Response>: (cid: ConversationId, callback: ServiceCallback<Response>) => void

A callback that should initiate a deregistration from the server

Type parameters

  • Response

Type declaration

EmitterEvent

EmitterEvent: () => void

Type declaration

    • (): void
    • Returns void

FieldData

FieldData: string | null

Field model data Record V2 field schema data

Typically created from a schema using FieldImpl.modelValue.

This type can be serialised and deserialised to JSON

max

max: number

The maximum number of occurrences of the node within its parent

min

min: number

The minimum number of occurrences of the node within its parent

name

name: string

The name of the field

Optional scale

scale: undefined | number

An optional scale for decimal field types

type

type: Type

The datatype of the field

GatewayClientRequest

The gateway client request type

GatewayResponse

The gateway response type

IdGenerator

IdGenerator: () => Promise<ConversationId>

A generator function for conversation IDs

Type declaration

Int64ImplSourceType

Int64ImplSourceType: string | number | Uint8Array | Int64Impl

The source type for reading integers

Int64SourceType

Int64SourceType: string | number | Uint8Array | Int64

A type that can be converted to an int64

InternalUpdateStreamFactory

InternalUpdateStreamFactory: (updateStream: UpdateStreamImpl) => InternalUpdateStream

A factory function creating internal update streams that act as a delegate

Type declaration

InvokeOperationResponseTypes

InvokeOperationResponseTypes: INVOKE_OPERATION | INVOKE_SERVICE_OPERATION

Json

Json: JSON

Alias for the JSON interface to keep compatibility with old TypeScript definitions

JsonDataType

JsonDataType: JSONDataType

Alias for the JSONDataType interface to keep compatibility with old TypeScript definitions

Matcher

Matcher: (s: string) => boolean | null

A function that tests if a string matches a regex

Type declaration

    • (s: string): boolean | null
    • Parameters

      • s: string

      Returns boolean | null

MessageCallback

MessageCallback: (e: Error | null, msg: Message | null) => void

A callback that is called when a Message is successfully parsed

Type declaration

MessageSender

MessageSender: (msg: Message) => void

A function definition for sending a message

Type declaration

OperationDetailResponseTypes

OperationDetailResponseTypes: GET_OPERATION_DETAIL | GET_SERVICE_OPERATION_DETAIL

OperationsResponseTypes

OperationsResponseTypes: GET_OPERATIONS | GET_SERVICE_OPERATIONS

ReconnectStrategy

ReconnectStrategy: (reconnect: () => void, abort: () => void, closeReason: CloseReason, reconnectAttempts: number) => void

A reconnection strategy. Invoked specifically on a reconnectable session disconnected event, the strategy encapsulates logic for execution of session reconnect attempts. Note that if a reconnect timeout has been configured within options, the session abort function may be invoked internally on timeout expiration. Timeout abort is not part of the strategy logic.

param

The session reconnect function, for strategic invocation

param

The session abort function, for strategic invocation

param

The reason for the latest disconnect CloseReason

param

The reconnect attempt count, for optional consideration (starting at 0)

Type declaration

    • (reconnect: () => void, abort: () => void, closeReason: CloseReason, reconnectAttempts: number): void
    • Parameters

      • reconnect: () => void
          • (): void
          • Returns void

      • abort: () => void
          • (): void
          • Returns void

      • closeReason: CloseReason
      • reconnectAttempts: number

      Returns void

RecordChanges

RecordChanges: Array<boolean | number>

Record changes

RecordData

RecordData: FieldData[]

Record data stored as array of field model data Record V2 record schema data

Typically created from a schema using RecordImpl.createModel.

This type can be serialised and deserialised to JSON

fields

fields: FieldData[]

The schema data of the fields contained in the record

max

max: number

The maximum number of occurrences of the node within its parent

min

min: number

The minimum number of occurrences of the node within its parent

name

name: string

The name of the field

RemoteServer

Remote server type can be either PrimaryInitiator, SecondaryInitiator or SecondaryAcceptor

RetryController

RetryController: (retryAttempts: number) => number | null | undefined

Defines a dynamic retry strategy. An alternative to a fixed RetryDescriptor, the function variant enables custom retry behaviour.

param

The current retry attempt count, starting at 0

returns

The desired interval (in ms) to wait before the next retry is executed, or null | undefined, if no further retry should be attempted.

since

6.13

Type declaration

    • (retryAttempts: number): number | null | undefined
    • Parameters

      • retryAttempts: number

      Returns number | null | undefined

RetryControllerImpl

RetryControllerImpl: (retryAttempts: number) => number | null | undefined

Defines a dynamic retry strategy. Alternative to a fixed RetryDescriptor.

param

The current retry attempt count, starting at 0

returns

The desired ms interval to wait before the next retry is executed, or null / undefined, if no further retry should be attempted.

Type declaration

    • (retryAttempts: number): number | null | undefined
    • Parameters

      • retryAttempts: number

      Returns number | null | undefined

RetryStrategy

Defines a retry strategy.

A retry strategy will be applied when an initial to attempt to open a session fails with a transient session establishment exception.

A retry strategy will be applied when recovering by a RecoverableUpdateStream following a recoverable exception.

since

6.10

RetryStrategyImpl

Defines a retry strategy.

ScriptOperation

ScriptOperation: (script: EditScript, start: number, length: number) => boolean

Type declaration

    • (script: EditScript, start: number, length: number): boolean
    • Parameters

      Returns boolean

Segment

A path segment

SerialiserMap

SerialiserMap: Map<any, Serialiser<any>>

A map of serialisers indexed by their value type

Service

Service<Response, Request, Response>: (internal: InternalSession, message: any, callback: CommandServiceCallback) => void

A service handler function Client service

Type parameters

  • Response

  • Request

  • Response

Type declaration

onRequest

  • Request handler

    Parameters

    Returns void

ServiceCallback

ServiceCallback<Response>: (error: any, response?: Response) => void

A callback function for a service

Type parameters

  • Response

Type declaration

    • (error: any, response?: Response): void
    • Parameters

      • error: any
      • Optional response: Response

      Returns void

ServiceListener

ServiceListener: (header: CommandHeader, input: BufferInputStream) => void

A listener callback that listens to service commands

Type declaration

ServiceRegistryListener

ServiceRegistryListener: (definition: ServiceDefinition<any, any>, service: Service<any, any>) => void

A listener function that can be notified on service registry updates

a @throws a RuntimeError if the service is already registered

Type declaration

SessionOptions

SessionOptions: Options

Alias for the Options interface to keep compatibility with old TypeScript definitions

SessionPropertiesEvent

Data type for a SESSION_PROPERTIES_EVENT request.

SessionResult

SessionResult: SessionProperties

Non-public API

StatusResponseTypes

StatusResponseTypes: GET_STATUS | GET_SERVICE_STATUS

StreamCallback

StreamCallback: (...args: any[]) => void

A callback function type for Streams

Type declaration

    • (...args: any[]): void
    • Parameters

      • Rest ...args: any[]

      Returns void

StringSourceType

StringSourceType: string | { toString: () => string }

A type that can be converted to a string

TokenValueType

TokenValueType: boolean | number | string | Uint8Array | null | undefined | Int64

TransportConnectionRequest

TransportConnectionRequest: ConnectionRequest & { type: ConnectionType }

The final type for a connection request once transport has been selected

TypedArray

TypedArray: Int8Array | Int16Array | Int32Array | Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | Float32Array | Float64Array

A typed array that can be passed as credentials

Events

close

close: (reason?: undefined | string) => void

Emitted when the Stream has been closed through completion or the underlying session has been closed. No further events will be emitted after this.

param

the reason why the stream was closed

Type declaration

    • (reason?: undefined | string): void
    • Parameters

      • Optional reason: undefined | string

      Returns void

error

error: (err: Error) => void

Emitted when an error occurs in the Stream or in any of its listeners. No further events will be emitted after this.

Type declaration

    • the error that occurred

      Parameters

      Returns void

Variables

Const ABSTAIN

ABSTAIN: Readonly<AuthenticatorResponse> = Object.freeze(new AuthenticatorResponse(TypeCode.ABSTAIN))

An AuthenticatorResponse that abstains

Const AUTHOR_ENCODING

AUTHOR_ENCODING: 3 = 3

Const AddAndSetTopicRequestSerialiser

AddAndSetTopicRequestSerialiser: AddAndSetTopicRequestSerialiserClass = new AddAndSetTopicRequestSerialiserClass()

Const AddTopicResultSerialiser

AddTopicResultSerialiser: AddTopicResultSerialiserClass = new AddTopicResultSerialiserClass()

The AddTopicResultSerialiser singleton

Const ApplyJsonPatchRequestSerialiser

ApplyJsonPatchRequestSerialiser: ApplyJsonPatchRequestSerialiserClass = new ApplyJsonPatchRequestSerialiserClass()

Const AuthenticatedPrincipalSerialiser

AuthenticatedPrincipalSerialiser: AuthenticatedPrincipalSerialiserClass = new AuthenticatedPrincipalSerialiserClass()

Const AuthenticatorRegistrationParametersSerialiser

AuthenticatorRegistrationParametersSerialiser: AuthenticatorRegistrationParametersSerialiserClass = new AuthenticatorRegistrationParametersSerialiserClass()

Const AuthenticatorRegistrationRequestSerialiser

AuthenticatorRegistrationRequestSerialiser: AuthenticatorRegistrationRequestSerialiserClass = new AuthenticatorRegistrationRequestSerialiserClass()

Const AuthenticatorRequestSerialiser

AuthenticatorRequestSerialiser: AuthenticatorRequestSerialiserClass = new AuthenticatorRequestSerialiserClass()

Const AuthenticatorResponseSerialiser

AuthenticatorResponseSerialiser: AuthenticatorResponseSerialiserClass = new AuthenticatorResponseSerialiserClass()

Const BAIL_OUT_FACTOR

BAIL_OUT_FACTOR: 10000 = 10000

Const BINARY_DELTA_TYPE

BINARY_DELTA_TYPE: BinaryDeltaTypeImpl<RecordV2, Uint8Array | RecordV2, RecordV2> = new BinaryDeltaTypeImpl<RecordV2, RecordV2 | Uint8Array, RecordV2>(RecordV2Impl, fromValue, identity)

A unique binary delta type instance to calculate deltas of BinaryImpl A unique binary delta type instance to calculate deltas of JSONImpl A unique binary delta type instance to calculate deltas of RecordV2Impl

Const BREAK_FLAG

BREAK_FLAG: Error = new Error()

Const BYTE_BREAK

BYTE_BREAK: 255 = 255

Const BooleanSerialiser

BooleanSerialiser: BooleanSerialiserClass = new BooleanSerialiserClass()

The BooleanSerialiser singleton

Const BranchMappingTableSerialiser

BranchMappingTableSerialiser: BranchMappingTableSerialiserClass = new BranchMappingTableSerialiserClass()

Const BufferSerialiser

BufferSerialiser: BufferSerialiserClass = new BufferSerialiserClass()

The BufferSerialiser singleton

Const BytesSerialiser

BytesSerialiser: BytesSerialiserClass = new BytesSerialiserClass()

The BytesSerialiserClass singleton

Const CBOR_FALSE

CBOR_FALSE: Uint8Array = new Uint8Array([-12])

Bytes that represent CBOR false value.

Const CBOR_NULL

CBOR_NULL: Uint8Array = new Uint8Array([-10])

Bytes that represent CBOR null value.

Const CBOR_TRUE

CBOR_TRUE: Uint8Array = new Uint8Array([-11])

Bytes that represent CBOR true value.

Const CIDSerialiser

CIDSerialiser: CIDSerialiserClass = new CIDSerialiserClass()

The CIDSerialiser singleton

CLOSED

CLOSED: CLOSED

Const CLOSE_TIMEOUT

CLOSE_TIMEOUT: number = (global as any).DIFFUSION_CLOSE_TIMEOUT || 1000

The amount of time to wait for the server to close the connection after a req is sent.

CLOSING

CLOSING: CLOSING

CONNECTED

CONNECTED: CONNECTED

CONNECTING

CONNECTING: CONNECTING

Const ChangeAuthorisationRolesFilterRequestSerialiser

ChangeAuthorisationRolesFilterRequestSerialiser: ChangeAuthorisationRolesFilterRequestSerialiserClass = new ChangeAuthorisationRolesFilterRequestSerialiserClass()

Const ChangeAuthorisationRolesRequestSerialiser

ChangeAuthorisationRolesRequestSerialiser: ChangeAuthorisationRolesRequestSerialiserClass = new ChangeAuthorisationRolesRequestSerialiserClass()

Const ChangePrincipalRequestSerialiser

ChangePrincipalRequestSerialiser: ChangePrincipalRequestSerialiserClass = new ChangePrincipalRequestSerialiserClass()

Const CheckRemoteServerRequestSerialiser

CheckRemoteServerRequestSerialiser: CheckRemoteServerRequestSerialiserClass = new CheckRemoteServerRequestSerialiserClass()

Const CheckRemoteServerResultSerialiser

CheckRemoteServerResultSerialiser: CheckRemoteServerResultSerialiserClass = new CheckRemoteServerResultSerialiserClass()

Const ClientFilterSubscribeRequestSerialiser

ClientFilterSubscribeRequestSerialiser: ClientFilterSubscribeRequestSerialiserClass = new ClientFilterSubscribeRequestSerialiserClass()

Const ClientFilterSubscribeResponseSerialiser

ClientFilterSubscribeResponseSerialiser: ClientFilterSubscribeResponseSerialiserClass = new ClientFilterSubscribeResponseSerialiserClass()

Const ClientSubscribeRequestSerialiser

ClientSubscribeRequestSerialiser: ClientSubscribeRequestSerialiserClass = new ClientSubscribeRequestSerialiserClass()

Const CloseClientRequestSerialiser

CloseClientRequestSerialiser: CloseClientRequestSerialiserClass = new CloseClientRequestSerialiserClass()

Const CommandHeaderSerialiser

CommandHeaderSerialiser: CommandHeaderSerialiserClass = new CommandHeaderSerialiserClass()

The CommandHeaderSerialiser singleton

Const ControlGroupSerialiser

ControlGroupSerialiser: ControlGroupSerialiserClass = new ControlGroupSerialiserClass()

The ControlGroupSerialiser singleton

Const ControlRegistrationParamsSerialiser

ControlRegistrationParamsSerialiser: ControlRegistrationParamsSerialiserClass = new ControlRegistrationParamsSerialiserClass()

Const CountOrParserErrorsSerialiser

CountOrParserErrorsSerialiser: CountOrParserErrorsSerialiserClass = new CountOrParserErrorsSerialiserClass()

Const CreateRemoteServerResultSerialiser

CreateRemoteServerResultSerialiser: CreateRemoteServerResultSerialiserClass = new CreateRemoteServerResultSerialiserClass()

Const CreateTopicViewResultSerialiser

CreateTopicViewResultSerialiser: CreateTopicViewResultSerialiserClass = new CreateTopicViewResultSerialiserClass()

Const CreateUpdateStreamAndSetRequestSerialiser

CreateUpdateStreamAndSetRequestSerialiser: CreateUpdateStreamAndSetRequestSerialiserClass = new CreateUpdateStreamAndSetRequestSerialiserClass()

Const CreateUpdateStreamRequestSerialiser

CreateUpdateStreamRequestSerialiser: CreateUpdateStreamRequestSerialiserClass = new CreateUpdateStreamRequestSerialiserClass()

Const CreateUpdateStreamResponseSerialiser

CreateUpdateStreamResponseSerialiser: CreateUpdateStreamResponseSerialiserClass = new CreateUpdateStreamResponseSerialiserClass()

Const DEFAULT

DEFAULT: Readonly<ControlGroup> = Object.freeze(new ControlGroup('default'))

A default Control Group

Const DEFAULT_ACTIVITY_MONITOR

DEFAULT_ACTIVITY_MONITOR: true = true

Const DEFAULT_CONNECT_TIMEOUT

DEFAULT_CONNECT_TIMEOUT: number = (global as any).DIFFUSION_CONNECT_TIMEOUT ?? 10000

The amount of time waiting for a connection to occur.

Const DEFAULT_HOST

DEFAULT_HOST: string = (typeof window !== 'undefined' && window.location.hostname)? window.location.hostname: 'localhost'

Const DEFAULT_MAX_MESSAGE_SIZE

DEFAULT_MAX_MESSAGE_SIZE: 2147483647 = 2147483647

Const DEFAULT_PASSWORD

DEFAULT_PASSWORD: "" = ""

Const DEFAULT_PATH

DEFAULT_PATH: "/diffusion" = "/diffusion"

Const DEFAULT_PORT

DEFAULT_PORT: number = (typeof window !== 'undefined'&& window.location.protocol === 'http:'&& window.location.port)? parseInt(window.location.port, 10): 80

Const DEFAULT_PRINCIPAL

DEFAULT_PRINCIPAL: "" = ""

Const DEFAULT_RANGE

DEFAULT_RANGE: Range = new Range(Point.atStart(), Point.offset(0))

A unique range covering the complete time series

Const DEFAULT_RANGE_QUERY

DEFAULT_RANGE_QUERY: Readonly<RangeQueryParameters> = Object.freeze(new RangeQueryParameters(QueryTypes.VALUES,DEFAULT_RANGE,DEFAULT_RANGE,MAX_SAFE_INTEGER))

A default range query

Let DEFAULT_RECONNECT_STRATEGY

DEFAULT_RECONNECT_STRATEGY: ReconnectStrategy = delayedReconnectionStrategy(5000, 5)

Const DEFAULT_RECONNECT_TIMEOUT

DEFAULT_RECONNECT_TIMEOUT: 60000 = 60000

Const DEFAULT_SECURE

DEFAULT_SECURE: boolean = typeof window === 'undefined' || window.location.protocol !== 'http:'

Const DEFAULT_SECURE_PORT

DEFAULT_SECURE_PORT: number = (typeof window !== 'undefined'&& window.location.protocol === 'https:'&& window.location.port)? parseInt(window.location.port, 10): 443

Const DEFAULT_TRANSPORTS

DEFAULT_TRANSPORTS: string[] = typeof window === 'undefined' ? ['WEBSOCKET'] : ['WEBSOCKET', 'XHR']

Const DELIMITER

DELIMITER: "////" = "////"

Const DENY

DENY: Readonly<AuthenticatorResponse> = Object.freeze(new AuthenticatorResponse(TypeCode.DENY))

An AuthenticatorResponse that denies authenticator

DISCONNECTED

DISCONNECTED: DISCONNECTED

Const DataTypesSingleton

DataTypesSingleton: DataTypesImpl = new DataTypesImpl()

Const DescendantQualifier

DescendantQualifier: Readonly<{ DESCENDANTS_OF_MATCH: DQ; MATCH: DQ; MATCH_AND_DESCENDANTS: DQ }> = Object.freeze({MATCH: new DQ(false),DESCENDANTS_OF_MATCH: new DQ(true),MATCH_AND_DESCENDANTS: new DQ(true)})

An enum like object containing descendant qualifiers

Const EDIT_EVENT

EDIT_EVENT: 1 = 1

Const EMPTY

EMPTY: JSONPointerMap = new JSONPointerMap()

An empty JSONPointerMap

Const EMPTY_BUFFER

EMPTY_BUFFER: Uint8Array = new Uint8Array(0)

Const EMPTY_FIELD

EMPTY_FIELD: 3 = 3

Byte indicating an empty field

Const EMPTY_FIELD_STRING

EMPTY_FIELD_STRING: string = String.fromCharCode(EMPTY_FIELD)

String representation of a byte indicating an empty field

Const EntriesFetchRequestSerialiser

EntriesFetchRequestSerialiser: EntriesFetchRequestSerialiserClass = new EntriesFetchRequestSerialiserClass()

Const EntriesFetchResponseSerialiser

EntriesFetchResponseSerialiser: EntriesFetchResponseSerialiserClass = new EntriesFetchResponseSerialiserClass()

Const ErrorReasonSerialiser

ErrorReasonSerialiser: ErrorReasonSerialiserClass = new ErrorReasonSerialiserClass()

The ErrorReasonSerialiser singleton

Const ErrorReportListSerialiser

ErrorReportListSerialiser: ErrorReportListSerialiserClass = new ErrorReportListSerialiserClass()

Const ErrorReportSerialiser

ErrorReportSerialiser: ErrorReportSerialiserClass = new ErrorReportSerialiserClass()

The ErrorReportSerialiser singleton

Const EventMetadataImplSerialiser

EventMetadataImplSerialiser: EventMetadataImplSerialiserClass = new EventMetadataImplSerialiserClass()

Const FALLBACK_SELECTOR

FALLBACK_SELECTOR: SelectorSet = new SelectorSet([])

Const FIELD_DELIMITER

FIELD_DELIMITER: 2 = 2

Delimiter byte for fields

Const FIELD_DELIMITER_STRING

FIELD_DELIMITER_STRING: string = String.fromCharCode(FIELD_DELIMITER)

String representation of a delimiter byte for fields

Const FIELD_MU

FIELD_MU: 5 = 5

Byte indicating a single field

Const FIELD_MU_STRING

FIELD_MU_STRING: string = String.fromCharCode(FIELD_MU)

String representation of a byte indicating a single field

Const FetchQueryResultSerialiser

FetchQueryResultSerialiser: FetchQueryResultSerialiserClass = new FetchQueryResultSerialiserClass()

Const FetchQuerySerialiser

FetchQuerySerialiser: FetchQuerySerialiserClass = new FetchQuerySerialiserClass()

The FetchQuerySerialiser singleton

Const GatewayClientConnectedClientDetailsSerialiser

GatewayClientConnectedClientDetailsSerialiser: GatewayClientConnectedClientDetailsSerialiserClass = new GatewayClientConnectedClientDetailsSerialiserClass()

Const GatewayClientDetailListRequestSerialiser

GatewayClientDetailListRequestSerialiser: GatewayClientDetailListRequestSerialiserClass = new GatewayClientDetailListRequestSerialiserClass()

Const GatewayClientDetailListSerialiser

GatewayClientDetailListSerialiser: GatewayClientDetailListSerialiserClass = new GatewayClientDetailListSerialiserClass()

Const GatewayClientDetailSerialiser

GatewayClientDetailSerialiser: GatewayClientDetailSerialiserClass = new GatewayClientDetailSerialiserClass()

Const GatewayClientKeySerialiser

GatewayClientKeySerialiser: GatewayClientKeySerialiserClass = new GatewayClientKeySerialiserClass()

Const GatewayClientListSerialiser

GatewayClientListSerialiser: GatewayClientListSerialiserClass = new GatewayClientListSerialiserClass()

Const GatewayClientRequestSerialiser

GatewayClientRequestSerialiser: GatewayClientRequestSerialiserClass = new GatewayClientRequestSerialiserClass()

Const GatewayOperationSerialiser

GatewayOperationSerialiser: GatewayOperationSerialiserClass = new GatewayOperationSerialiserClass()

Const GatewayResponseSerialiser

GatewayResponseSerialiser: GatewayResponseSerialiserClass = new GatewayResponseSerialiserClass()

Const GatewayServiceIdSerialiser

GatewayServiceIdSerialiser: GatewayServiceIdSerialiserClass = new GatewayServiceIdSerialiserClass()

Const GatewayServiceSerialiser

GatewayServiceSerialiser: GatewayServiceSerialiserClass = new GatewayServiceSerialiserClass()

The GatewayServiceSerialiser singleton

Const GatewayServiceTypeSerialiser

GatewayServiceTypeSerialiser: GatewayServiceTypeSerialiserClass = new GatewayServiceTypeSerialiserClass()

Const GetSelectorsResultSerialiser

GetSelectorsResultSerialiser: GetSelectorsResultSerialiserClass = new GetSelectorsResultSerialiserClass()

Const GetSessionLockResultSerialiser

GetSessionLockResultSerialiser: GetSessionLockResultSerialiserClass = new GetSessionLockResultSerialiserClass()

Const GetSessionLocksResultSerialiser

GetSessionLocksResultSerialiser: GetSessionLocksResultSerialiserClass = new GetSessionLocksResultSerialiserClass()

Const GetSessionPropertiesRequestSerialiser

GetSessionPropertiesRequestSerialiser: GetSessionPropertiesRequestSerialiserClass = new GetSessionPropertiesRequestSerialiserClass()

Const GetSessionPropertiesResponseSerialiser

GetSessionPropertiesResponseSerialiser: GetSessionPropertiesResponseSerialiserClass = new GetSessionPropertiesResponseSerialiserClass()

Const GetTopicViewResultSerialiser

GetTopicViewResultSerialiser: GetTopicViewResultSerialiserClass = new GetTopicViewResultSerialiserClass()

Const HOST_NAME

HOST_NAME: RegExp = /^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\.?$/

Const INDEX0

INDEX0: IndexSegment = new IndexSegment(0)

INITIALISING

INITIALISING: INITIALISING

Const IPV4

IPV4: RegExp = new RegExp(`^(?:${OCTET}\\.){3}${OCTET}$`)

Const IntegerSerialiser

IntegerSerialiser: IntegerSerialiserClass = new IntegerSerialiserClass()

The IntegerSerialiser singleton

Const JsonPatchResultSerialiser

JsonPatchResultSerialiser: JsonPatchResultSerialiserClass = new JsonPatchResultSerialiserClass()

Const LOG

LOG: Logger = logger.create('Conversation Set')

Const ListGlobalPermissionsResultSerialiser

ListGlobalPermissionsResultSerialiser: ListGlobalPermissionsResultSerialiserClass = new ListGlobalPermissionsResultSerialiserClass()

Const ListMetricAlertsResultSerialiser

ListMetricAlertsResultSerialiser: ListMetricAlertsResultSerialiserClass = new ListMetricAlertsResultSerialiserClass()

The singleton

Const ListPathPermissionsResultSerialiser

ListPathPermissionsResultSerialiser: ListPathPermissionsResultSerialiserClass = new ListPathPermissionsResultSerialiserClass()

Const ListRemoteServersResultSerialiser

ListRemoteServersResultSerialiser: ListRemoteServersResultSerialiserClass = new ListRemoteServersResultSerialiserClass()

Const ListTopicViewsResultSerialiser

ListTopicViewsResultSerialiser: ListTopicViewsResultSerialiserClass = new ListTopicViewsResultSerialiserClass()

Long

Long: Long

Const MAXIMUM_CACHE_SIZE

MAXIMUM_CACHE_SIZE: 1000 = 1000

Const MAXIMUM_STORAGE

MAXIMUM_STORAGE: 2147483647 = 2147483647

Const MAXIMUM_TIMEOUT

MAXIMUM_TIMEOUT: number = 60 * 60 * 1000

Const MAX_INT32

MAX_INT32: 2147483647 = 2147483647

Maximum 32 bit integer value: 2^32 - 1

Const MAX_POLL_ATTEMPTS

MAX_POLL_ATTEMPTS: 3 = 3

The number of times a poll request is sent before the transport gives up and closes. The server ignores a poll's sequence number, so this is not bound by the message-sequence-timeout.

Const MAX_REDIRECTS

MAX_REDIRECTS: 5 = 5

The most redirects followed during one connection attempt.

Const MAX_SAFE_INTEGER

MAX_SAFE_INTEGER: 9007199254740991 = 9007199254740991

Maximum safe integer value for JavaScript numbers: 2^53 - 1

Const MAX_SEND_ATTEMPTS

MAX_SEND_ATTEMPTS: 3 = 3

The number of times a send request is sent before the transport gives up and closes. A send retry repeats its sequence number, so every attempt has to fit inside the server's message-sequence-timeout (4s by default), after which it closes the channel on an unfilled sequence gap.

Const MESSAGE_TYPE_MASK

MESSAGE_TYPE_MASK: 11000000 = 11000000

Bitmask for the message type

Const METADATA_OFFSETS

METADATA_OFFSETS: 2 = 2

Const MIN_MAX_MESSAGE_SIZE

MIN_MAX_MESSAGE_SIZE: 1024 = 1024

The minimum value that the maximum message size can be set to in bytes.

Const MIN_SAFE_INTEGER

MIN_SAFE_INTEGER: -9007199254740991 = -9007199254740991

Minimum safe integer value for JavaScript numbers: -(2^53 - 1)

Const MeasuredEntityClassMetricsSerialiser

MeasuredEntityClassMetricsSerialiser: MeasuredEntityClassMetricsSerialiserClass = new MeasuredEntityClassMetricsSerialiserClass()

The singleton

Const MeasuredEntityClassRequestSerialiser

MeasuredEntityClassRequestSerialiser: MeasuredEntityClassRequestSerialiserClass = new MeasuredEntityClassRequestSerialiserClass()

The singleton

Const MessageReceiverControlRegistrationParamsSerialiser

MessageReceiverControlRegistrationParamsSerialiser: MessageReceiverControlRegistrationParamsSerialiserClass = new MessageReceiverControlRegistrationParamsSerialiserClass()

Const MessageReceiverControlRegistrationRequestSerialiser

MessageReceiverControlRegistrationRequestSerialiser: MessageReceiverControlRegistrationRequestSerialiserClass = new MessageReceiverControlRegistrationRequestSerialiserClass()

Const MessagingClientForwardSendRequestSerialiser

MessagingClientForwardSendRequestSerialiser: MessagingClientForwardSendRequestSerialiserClass = new MessagingClientForwardSendRequestSerialiserClass()

Const MessagingClientSendRequestSerialiser

MessagingClientSendRequestSerialiser: MessagingClientSendRequestSerialiserClass = new MessagingClientSendRequestSerialiserClass()

Const MessagingFilterResponseSerialiser

MessagingFilterResponseSerialiser: MessagingFilterResponseSerialiserClass = new MessagingFilterResponseSerialiserClass()

Const MessagingFilterSendRequestSerialiser

MessagingFilterSendRequestSerialiser: MessagingFilterSendRequestSerialiserClass = new MessagingFilterSendRequestSerialiserClass()

Const MessagingFilterSendResponseSerialiser

MessagingFilterSendResponseSerialiser: MessagingFilterSendResponseSerialiserClass = new MessagingFilterSendResponseSerialiserClass()

Const MessagingResponseSerialiser

MessagingResponseSerialiser: MessagingResponseSerialiserClass = new MessagingResponseSerialiserClass()

Const MessagingSendRequestSerialiser

MessagingSendRequestSerialiser: MessagingSendRequestSerialiserClass = new MessagingSendRequestSerialiserClass()

Const MetricCollectorNameSerialiser

MetricCollectorNameSerialiser: MetricCollectorNameSerialiserClass = new MetricCollectorNameSerialiserClass()

The singleton

Const MetricsRequestSerialiser

MetricsRequestSerialiser: MetricsRequestSerialiserClass = new MetricsRequestSerialiserClass()

The singleton

Const MetricsResultSerialiser

MetricsResultSerialiser: MetricsResultSerialiserClass = new MetricsResultSerialiserClass()

The singleton

Const MissingTopicRequestSerialiser

MissingTopicRequestSerialiser: MissingTopicRequestSerialiserClass = new MissingTopicRequestSerialiserClass()

Const NEXT_CID

NEXT_CID: IdGenerator = (() => {let id = new Long(0);return async () => {id = id.add(1);return new ConversationId(id);};})()

A generator for creating sequential conversation IDs across an arbitrary number of conversation sets.

Const NO_CHANGE

NO_CHANGE: NoChange = new NoChange()

Global no-change constant Instance of the NoChange RecordV2 delta

Const NULL_CBOR

NULL_CBOR: BytesImpl = new BytesImpl(Uint8Array.from([0xf6]))

Const NUMBER

NUMBER: RegExp = /^(?:[0-9]+|0[xX][0-9A-Fa-f]*)$/

Const NamedTopicViewSpecificationSerialiser

NamedTopicViewSpecificationSerialiser: NamedTopicViewSpecificationSerialiserClass = new NamedTopicViewSpecificationSerialiserClass()

Const NodeWebSocket

NodeWebSocket: any = require('ws')

Const OCTET

OCTET: "(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])" = "(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])"

Const ONEWAY_CID

ONEWAY_CID: ConversationId = new ConversationId(Long.fromNumber(0))

A special conversation ID for one-way conversations

Const ORIGINAL_EVENT

ORIGINAL_EVENT: 0 = 0

Const P16

P16: number = 1 << 16

Const P24

P24: number = 1 << 24

Const P32

P32: number = P16 * P16

Const PADDING

PADDING: "0000000000000000" = "0000000000000000"

Const PATH

PATH: RegExp = /^(?:[A-Za-z0-9._~!$&'()*+,;=:@/-]|%[0-9A-Fa-f]{2})*$/

Const PATH_SEPARATOR

PATH_SEPARATOR: "/" = "/"

The topic path separator character.

Const QUERY_OR_FRAGMENT

QUERY_OR_FRAGMENT: RegExp = /^(?:[A-Za-z0-9._~!$&'()*+,;=:@/?[\]-]|%[0-9A-Fa-f]{2})*$/

RECONNECTING

RECONNECTING: RECONNECTING

Const RECORD_DELIMITER

RECORD_DELIMITER: 1 = 1

Delimiter byte for records

Const RECORD_DELIMITER_STRING

RECORD_DELIMITER_STRING: string = String.fromCharCode(RECORD_DELIMITER)

String representation of a delimiter byte for records

Const RECORD_MU

RECORD_MU: 4 = 4

Byte indicating a single record

Const RECORD_MU_STRING

RECORD_MU_STRING: string = String.fromCharCode(RECORD_MU)

String representation of a byte indicating a single record

Const RECOVERY_BUFFER_INDEX_SIZE

RECOVERY_BUFFER_INDEX_SIZE: number = (global as any).DIFFUSION_RECOVERY_BUFFER_INDEX_SIZE || 8

The default recovery buffer index size

Const REPLACE

REPLACE: 1 = 1

Const RETRY_DELAY

RETRY_DELAY: 50 = 50

The delay before the first retry, in milliseconds. Each further retry triples it, so all attempts for one request span about 200ms - well inside the server's message-sequence-timeout (4s by default), after which it closes the channel on an unfilled sequence gap.

Const ROOT

ROOT: JSONPointer = new JSONPointer([])

JSONPointer representing the root

Const RangeQueryRequestSerialiser

RangeQueryRequestSerialiser: RangeQueryRequestSerialiserClass = new RangeQueryRequestSerialiserClass()

Const ReauthenticateRequestSerialiser

ReauthenticateRequestSerialiser: ReauthenticateRequestSerialiserClass = new ReauthenticateRequestSerialiserClass()

Const RemoteServerDefinitionSerialiser

RemoteServerDefinitionSerialiser: RemoteServerDefinitionSerialiserClass = new RemoteServerDefinitionSerialiserClass()

Const RemoveTopicSerialiser

RemoveTopicSerialiser: RemoveTopicSerialiserClass = new RemoveTopicSerialiserClass()

The RemoveTopicSerialiser singleton

Const ReplaceLicenceResponseSerialiser

ReplaceLicenceResponseSerialiser: ReplaceLicenceResponseSerialiserClass = new ReplaceLicenceResponseSerialiserClass()

Const ResponseCommandHeaderSerialiser

ResponseCommandHeaderSerialiser: ResponseCommandHeaderSerialiserClass = new ResponseCommandHeaderSerialiserClass()

Const SERVER

SERVER: RegExp = /^(?:(?:[A-Za-z0-9._~!$&'()*+,;=:-]|%[0-9A-Fa-f]{2})*@)?(\[[^\]]*\]|[^:[\]]*)(?::([0-9]*))?$/

Const START_POINT

START_POINT: Point = new Point(0, Types.ABSOLUTE_START)

A unique start point

Const SUCCESS

SUCCESS: 0 = 0

Const SecurityCommandScriptSerialiser

SecurityCommandScriptSerialiser: SecurityCommandScriptSerialiserClass = new SecurityCommandScriptSerialiserClass()

Const SecurityConfigurationSerialiser

SecurityConfigurationSerialiser: SecurityConfigurationSerialiserClass = new SecurityConfigurationSerialiserClass()

Const ServerMetricsSerialiser

ServerMetricsSerialiser: ServerMetricsSerialiserClass = new ServerMetricsSerialiserClass()

The singleton

Const SessionEventListenerRegistrationRequestSerialiser

SessionEventListenerRegistrationRequestSerialiser: SessionEventListenerRegistrationRequestSerialiserClass = new SessionEventListenerRegistrationRequestSerialiserClass()

Const SessionFetchQueryResultSerialiser

SessionFetchQueryResultSerialiser: SessionFetchQueryResultSerialiserClass = new SessionFetchQueryResultSerialiserClass()

Const SessionFetchQuerySerialiser

SessionFetchQuerySerialiser: SessionFetchQuerySerialiserClass = new SessionFetchQuerySerialiserClass()

Const SessionIdSerialiser

SessionIdSerialiser: SessionIdSerialiserClass = new SessionIdSerialiserClass()

The BooleanSerialiser singleton

Const SessionLockAcquisitionSerialiser

SessionLockAcquisitionSerialiser: SessionLockAcquisitionSerialiserClass = new SessionLockAcquisitionSerialiserClass()

Const SessionLockDetailsSerialiser

SessionLockDetailsSerialiser: SessionLockDetailsSerialiserClass = new SessionLockDetailsSerialiserClass()

Const SessionLockRequestSerialiser

SessionLockRequestSerialiser: SessionLockRequestSerialiserClass = new SessionLockRequestSerialiserClass()

Const SessionMetricCollectorListSerialiser

SessionMetricCollectorListSerialiser: SessionMetricCollectorListSerialiserClass = new SessionMetricCollectorListSerialiserClass()

The singleton

Const SessionMetricCollectorSerialiser

SessionMetricCollectorSerialiser: SessionMetricCollectorSerialiserClass = new SessionMetricCollectorSerialiserClass()

The singleton

Const SessionPropertiesEventBatchSerialiser

SessionPropertiesEventBatchSerialiser: SessionPropertiesEventBatchSerialiserClass = new SessionPropertiesEventBatchSerialiserClass()

Const SessionPropertiesEventSerialiser

SessionPropertiesEventSerialiser: SessionPropertiesEventSerialiserClass = new SessionPropertiesEventSerialiserClass()

Const SessionPropertyValidationSerialiser

SessionPropertyValidationSerialiser: SessionPropertyValidationSerialiserClass = new SessionPropertyValidationSerialiserClass()

Const SessionTreeBranchListSerialiser

SessionTreeBranchListSerialiser: SessionTreeBranchListSerialiserClass = new SessionTreeBranchListSerialiserClass()

Const SetClientConflationFilterRequestSerialiser

SetClientConflationFilterRequestSerialiser: SetClientConflationFilterRequestSerialiserClass = new SetClientConflationFilterRequestSerialiserClass()

Const SetClientConflationRequestSerialiser

SetClientConflationRequestSerialiser: SetClientConflationRequestSerialiserClass = new SetClientConflationRequestSerialiserClass()

Const SetMetricAlertRequestSerialiser

SetMetricAlertRequestSerialiser: SetMetricAlertRequestSerialiserClass = new SetMetricAlertRequestSerialiserClass()

The singleton

Const SetSessionPropertiesFilterRequestSerialiser

SetSessionPropertiesFilterRequestSerialiser: SetSessionPropertiesFilterRequestSerialiserClass = new SetSessionPropertiesFilterRequestSerialiserClass()

Const SetSessionPropertiesListenerSerialiser

SetSessionPropertiesListenerSerialiser: SetSessionPropertiesListenerSerialiserClass = new SetSessionPropertiesListenerSerialiserClass()

Const SetSessionPropertiesRequestSerialiser

SetSessionPropertiesRequestSerialiser: SetSessionPropertiesRequestSerialiserClass = new SetSessionPropertiesRequestSerialiserClass()

Const SetSessionPropertiesResultSerialiser

SetSessionPropertiesResultSerialiser: SetSessionPropertiesResultSerialiserClass = new SetSessionPropertiesResultSerialiserClass()

Const SetTopicRequestSerialiser

SetTopicRequestSerialiser: SetTopicRequestSerialiserClass = new SetTopicRequestSerialiserClass()

Const StatusItemSerialiser

StatusItemSerialiser: StatusItemSerialiserClass = new StatusItemSerialiserClass()

The StatusItemSerialiser singleton

Const StringSerialiser

StringSerialiser: StringSerialiserClass = new StringSerialiserClass()

The StringSerialiser singleton

Const Subtransports

Subtransports: {} = Object.freeze({/*** WebSocket subtransport. Supports detection of availability and construction when available.*/WS : websocketSubTransportFactoryProvider(),/*** HTTP polling subtransport. Supports detection of availability and construction when available.*/XHR : xhrSubTransportFactoryProvider(),/*** WebSocket subtransport. Supports detection of availability and construction when available.*/WEBSOCKET : websocketSubTransportFactoryProvider(),/*** HTTP polling subtransport. Supports detection of availability and construction when available.*/HTTP_POLLING : xhrSubTransportFactoryProvider()})

Support the detection and creation of WebSocket and XmlHttpRequest objects in an environment independent way. Each subtransport object provides an enabled field that indicates if the subtransport works and if it works the environment specific constructor for the object.

The subtransports will be looked up by transport name.

Type declaration

Const SystemAuthenticationConfigurationSerialiser

SystemAuthenticationConfigurationSerialiser: SystemAuthenticationConfigurationSerialiserClass = new SystemAuthenticationConfigurationSerialiserClass()

Const SystemPrincipalSerialiser

SystemPrincipalSerialiser: SystemPrincipalSerialiserClass = new SystemPrincipalSerialiserClass()

Const TIMESTAMP_ROUNDING

TIMESTAMP_ROUNDING: 10 = 10

How many bits of a timestamp to discard. The default rounds to approximately 1 second.

see

roundTimeStamp

Const TIME_SERIES_DATA_TYPE

TIME_SERIES_DATA_TYPE: TimeSeriesEventDataType<any, any> = TimeSeriesEventDataType.create<any, any, any>({name: () => 'event data type',readValue: (buffer: Uint8Array) => buffer,toBytes: (val: any): BytesImpl => val} as any)

Const TOKEN_LENGTH

TOKEN_LENGTH: 24 = 24

The buffer length os a session token

Const TWO_POW_32

TWO_POW_32: 4294967296 = 4294967296

Const TimeSeriesAppendRequestSerialiser

TimeSeriesAppendRequestSerialiser: TimeSeriesAppendRequestSerialiserClass = new TimeSeriesAppendRequestSerialiserClass()

Const TimeSeriesEditRequestSerialiser

TimeSeriesEditRequestSerialiser: TimeSeriesEditRequestSerialiserClass = new TimeSeriesEditRequestSerialiserClass()

Const TimeSeriesTimestampAppendRequestSerialiser

TimeSeriesTimestampAppendRequestSerialiser: TimeSeriesTimestampAppendRequestSerialiserClass = new TimeSeriesTimestampAppendRequestSerialiserClass()

Const TopicAddRequestSerialiser

TopicAddRequestSerialiser: TopicAddRequestSerialiserClass = new TopicAddRequestSerialiserClass()

Const TopicAddResponseSerialiser

TopicAddResponseSerialiser: TopicAddResponseSerialiserClass = new TopicAddResponseSerialiserClass()

Const TopicControlRegistrationParamsSerialiser

TopicControlRegistrationParamsSerialiser: TopicControlRegistrationParamsSerialiserClass = new TopicControlRegistrationParamsSerialiserClass()

Const TopicControlRegistrationRequestSerialiser

TopicControlRegistrationRequestSerialiser: TopicControlRegistrationRequestSerialiserClass = new TopicControlRegistrationRequestSerialiserClass()

Const TopicMetricCollectorListSerialiser

TopicMetricCollectorListSerialiser: TopicMetricCollectorListSerialiserClass = new TopicMetricCollectorListSerialiserClass()

The singleton

Const TopicMetricCollectorSerialiser

TopicMetricCollectorSerialiser: TopicMetricCollectorSerialiserClass = new TopicMetricCollectorSerialiserClass()

The singleton

Const TopicNotificationDeregistrationRequestSerialiser

TopicNotificationDeregistrationRequestSerialiser: TopicNotificationDeregistrationRequestSerialiserClass = new TopicNotificationDeregistrationRequestSerialiserClass()

Const TopicNotificationDescendantEventSerialiser

TopicNotificationDescendantEventSerialiser: TopicNotificationDescendantEventSerialiserClass = new TopicNotificationDescendantEventSerialiserClass()

Const TopicNotificationDeselectionSerialiser

TopicNotificationDeselectionSerialiser: TopicNotificationDeselectionSerialiserClass = new TopicNotificationDeselectionSerialiserClass()

Const TopicNotificationEventSerialiser

TopicNotificationEventSerialiser: TopicNotificationEventSerialiserClass = new TopicNotificationEventSerialiserClass()

Const TopicNotificationSelectionSerialiser

TopicNotificationSelectionSerialiser: TopicNotificationSelectionSerialiserClass = new TopicNotificationSelectionSerialiserClass()

Const TopicSelectionRequestSerialiser

TopicSelectionRequestSerialiser: TopicSelectionRequestSerialiserClass = new TopicSelectionRequestSerialiserClass()

Const TopicSelectorSerialiser

TopicSelectorSerialiser: TopicSelectorSerialiserClass = new TopicSelectorSerialiserClass()

The TopicSelectorSerialiser singleton

Const TopicSpecificationInfoSerialiser

TopicSpecificationInfoSerialiser: TopicSpecificationInfoSerialiserClass = new TopicSpecificationInfoSerialiserClass()

Const URI_REFERENCE

URI_REFERENCE: RegExp = /^(?:([^:/?#]+):)?(?:\/\/([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#([\s\S]*))?$/

Const UnsubscribeAllByFilterRequestSerialiser

UnsubscribeAllByFilterRequestSerialiser: UnsubscribeAllByFilterRequestSerialiserClass = new UnsubscribeAllByFilterRequestSerialiserClass()

Const UnsubscribeAllControlRequestSerialiser

UnsubscribeAllControlRequestSerialiser: UnsubscribeAllControlRequestSerialiserClass = new UnsubscribeAllControlRequestSerialiserClass()

Const UnsubscriptionNotificationSerialiser

UnsubscriptionNotificationSerialiser: UnsubscriptionNotificationSerialiserClass = new UnsubscriptionNotificationSerialiserClass()

Const UpdateStreamAddTopicRequestSerialiser

UpdateStreamAddTopicRequestSerialiser: UpdateStreamAddTopicRequestSerialiserClass = new UpdateStreamAddTopicRequestSerialiserClass()

Const UpdateStreamAddTopicResponseSerialiser

UpdateStreamAddTopicResponseSerialiser: UpdateStreamAddTopicResponseSerialiserClass = new UpdateStreamAddTopicResponseSerialiserClass()

Const UpdateStreamIdSerialiser

UpdateStreamIdSerialiser: UpdateStreamIdSerialiserClass = new UpdateStreamIdSerialiserClass()

The UpdateStreamIdSerialiser singleton

Const UpdateStreamRequestSerialiser

UpdateStreamRequestSerialiser: UpdateStreamRequestSerialiserClass = new UpdateStreamRequestSerialiserClass()

Const ZLIB_TYPE_FLAGS

ZLIB_TYPE_FLAGS: 128 = 128

A flag indicating a zlib compressed message

Const buffer

buffer: { constructor: any; poolSize: number; prototype: Buffer; alloc: any; allocUnsafe: any; allocUnsafeSlow: any; byteLength: any; compare: any; concat: any; from: any; isBuffer: any; isEncoding: any } = Buffer as any

Access to the Buffer API that is packaged with diffusion.

This can be used in browsers that don't have a native Buffer class. It allows the creation of buffers for use with binary datatypes.

example
const buf = diffusion.buffer.from('Hello World', 'utf8')
deprecated

since version 6.11. Buffer has been replaced by Uint8Array.This will be removed in a future release.

Type declaration

  • constructor: function
    • new __type(str: string, encoding?: string | undefined): Buffer
    • new __type(size: number): Buffer
    • new __type(array: Uint8Array): Buffer
    • new __type(arrayBuffer: ArrayBuffer): Buffer
    • new __type(array: any[]): Buffer
    • new __type(buffer: Buffer): Buffer
    • Parameters

      • str: string
      • Optional encoding: string | undefined

      Returns Buffer

    • Parameters

      • size: number

      Returns Buffer

    • Parameters

      • array: Uint8Array

      Returns Buffer

    • Parameters

      • arrayBuffer: ArrayBuffer

      Returns Buffer

    • Parameters

      • array: any[]

      Returns Buffer

    • Parameters

      • buffer: Buffer

      Returns Buffer

  • poolSize: number
  • prototype: Buffer
  • alloc: function
    • alloc(size: number, fill?: string | number | Buffer | undefined, encoding?: string | undefined): Buffer
    • Parameters

      • size: number
      • Optional fill: string | number | Buffer | undefined
      • Optional encoding: string | undefined

      Returns Buffer

  • allocUnsafe: function
    • allocUnsafe(size: number): Buffer
    • Parameters

      • size: number

      Returns Buffer

  • allocUnsafeSlow: function
    • allocUnsafeSlow(size: number): Buffer
    • Parameters

      • size: number

      Returns Buffer

  • byteLength: function
    • byteLength(string: string | DataView | ArrayBuffer | Buffer, encoding?: string | undefined): number
    • Parameters

      • string: string | DataView | ArrayBuffer | Buffer
      • Optional encoding: string | undefined

      Returns number

  • compare: function
    • compare(buf1: Buffer, buf2: Buffer): number
    • Parameters

      • buf1: Buffer
      • buf2: Buffer

      Returns number

  • concat: function
    • concat(list: Buffer[], totalLength?: number | undefined): Buffer
    • Parameters

      • list: Buffer[]
      • Optional totalLength: number | undefined

      Returns Buffer

  • from: function
    • from(arrayBuffer: ArrayBuffer, byteOffset?: number | undefined, length?: number | undefined): Buffer
    • from(data: string | any[] | ArrayBuffer | Buffer): Buffer
    • from(str: string, encoding?: string | undefined): Buffer
    • Parameters

      • arrayBuffer: ArrayBuffer
      • Optional byteOffset: number | undefined
      • Optional length: number | undefined

      Returns Buffer

    • Parameters

      • data: string | any[] | ArrayBuffer | Buffer

      Returns Buffer

    • Parameters

      • str: string
      • Optional encoding: string | undefined

      Returns Buffer

  • isBuffer: function
    • isBuffer(obj: any): obj is Buffer
    • Parameters

      • obj: any

      Returns obj is Buffer

  • isEncoding: function
    • isEncoding(encoding: string): boolean
    • Parameters

      • encoding: string

      Returns boolean

Const build

build: string = "0ff9343e"

The build version of this client library

Let cacheBytesRead

cacheBytesRead: number

Let cachedHash

cachedHash: Uint8Array

Const cachedParse

cachedParse: (expression: string | TopicSelector | Array<string | TopicSelector>, ...args: Array<string | TopicSelector>) => AbstractTopicSelector = disableTopicCache? /* istanbul ignore next */ parseSelector: memoize(parseSelector, new Map<string, any>())

Wrap the parse function to cache results

Type declaration

Let cachedTopicSpecification

cachedTopicSpecification: TopicSpecification

Const clients

clients: ClientControlOptionsNamespace = ClientControlOptions

Access to PropertyKeys

Const datatypes

datatypes: DataTypes = DataTypesImpl

Access to the datatypes namespace

Const disableTopicCache

disableTopicCache: boolean = process && process.env && (process.env.DISABLE_TOPIC_CACHE === 'true')

Const emitterEventQueue

emitterEventQueue: EmitterEventQueue = new EmitterEventQueue()

Const encoder

encoder: Encoder = new Encoder()

Global CBOR encoder

Const errors

errors: {} = ErrorReason

The ErrorReason enum

Type declaration

Const keys

keys: string[] = ['PUBLISH_VALUES_ONLY','SCHEMA','VALIDATE_VALUES','TIDY_ON_UNSUBSCRIBE','TIME_SERIES_EVENT_VALUE_TYPE','TIME_SERIES_RETAINED_RANGE','TIME_SERIES_SUBSCRIPTION_RANGE','DONT_RETAIN_VALUE','PERSISTENT','REMOVAL','OWNER','COMPRESSION','CONFLATION','PRIORITY']

Valid TopicSpecification keys

Const knownTransports

knownTransports: {} = Object.freeze({WS : WSTransport,XHR : XHRTransport,WEBSOCKET : WSTransport,HTTP_POLLING : XHRTransport})

The known transports. Will be looked up by name.

Type declaration

  • [name: string]: {}

Const locks

locks: SessionLockOptionsNamespace = SessionLockOptions

Access to the locks namespace

Const logger

logger: Logger = Logger.create('Registration')

Const metaChars

metaChars: string[] = ['*', '.', '+', '?', '^', '$', '{', '}', '(', ')', '[', ']', '\\', '|']

Invalid characters for a topic path to contain

Let onconnect

onconnect: (e: MessageEvent) => void

Type declaration

    • (e: MessageEvent): void
    • Parameters

      • e: MessageEvent

      Returns void

Const pingTimeoutFactor

pingTimeoutFactor: 2 = 2

The client will wait a maximum of two system ping periods for a ping from the server before declaring the connection idle and closing it.

Const selectors

selectors: TopicSelectors = new TopicSelectors()

Access to the selectors namespace

Const setLevel

setLevel: setLevel = logger.setLevel

Disables logging below the given level.

Export is forwarded from loglevel.setLevel.

see

https://www.npmjs.com/package/loglevel

Const topicUpdate

topicUpdate: TopicUpdateNamespace = TopicUpdateNamespace

Access to the topicUpdate namespace

Const topics

topics: TopicsNamespace = topicsNamespace

Access to the topics namespace

Const uint8FromBase64

uint8FromBase64: (Anonymous function) = (typeof window === 'undefined' || window.atob === undefined) ?(str: string): Uint8Array => new Uint8Array(Buffer.from(str, 'base64')) :(str: string): Uint8Array => new Uint8Array(window.atob(str).split('').map(c => c.charCodeAt(0)))

Creates a Uint8Array from a base64 string.

param

The base64 string

returns

A new Uint8Array

Const uint8ToBase64

uint8ToBase64: (Anonymous function) = (typeof window === 'undefined' || window.btoa === undefined) ?(val: Uint8Array): string => Buffer.from(val).toString('base64') :(val: Uint8Array): string => window.btoa(uint8ToAscii(val))

Converts a Uint8Array to a base64 string.

param

The Uint8Array to convert

returns

A base64 string

Const updateConstraintFactory

updateConstraintFactory: Readonly<UpdateConstraintFactoryImpl> = Object.freeze(new UpdateConstraintFactoryImpl())

The UpdateConstraintFactory singleton instance

Const version

version: string = "6.13.0"

The version of this client library in the form major.minor.patch

Const x7F

x7F: Long = Long.fromNumber(0x7F)

Const x7FInv

x7FInv: Long = x7F.not()

Const x80

x80: Long = Long.fromNumber(0x80)

Let zlib

zlib: any

Functions

Const DEFAULT_ABORT_STRATEGY

  • DEFAULT_ABORT_STRATEGY(start: () => void, abort: () => void): void
  • Parameters

    • start: () => void
        • (): void
        • Returns void

    • abort: () => void
        • (): void
        • Returns void

    Returns void

INSERT

  • INSERT(script: EditScript, start: number, length: number): boolean
  • Parameters

    Returns boolean

MATCH

  • MATCH(script: EditScript, start: number, length: number): boolean
  • Parameters

    Returns boolean

NOOP

  • NOOP(): boolean
  • Returns boolean

addField

  • addField(bytes: Uint8Array, records: RecordData[], startPos: number, endPos: number, fields: RecordData): boolean
  • Add a field to the array of fields

    Parameters

    • bytes: Uint8Array

      the buffer to parse

    • records: RecordData[]

      a reference to the records that will be constructed.

    • startPos: number

      the start position in the buffer of the last field

    • endPos: number

      the end position in the buffer of the last field

    • fields: RecordData

    Returns boolean

    true if the fields have been added to the records.

approximateSquareRoot

  • approximateSquareRoot(value: number): number
  • Cheap approximation to a square root.

    throws

    an IllegalArgumentError if the value is negative

    Parameters

    • value: number

      the argument of the square-root function

    Returns number

    a power of two that approximates the square root of a value

bytesToEvent

  • bytesToEvent<V>(bytesToValue: (bytes: Uint8Array) => V, bytes: Bytes): Event<V>
  • A converter function that converts bytes data to an event

    Type parameters

    • V

    Parameters

    • bytesToValue: (bytes: Uint8Array) => V

      a converter function that converts bytes data to an underlying value

        • (bytes: Uint8Array): V
        • Parameters

          • bytes: Uint8Array

          Returns V

    • bytes: Bytes

      the bytes containing the event in binary form

    Returns Event<V>

    the event that was extracted from the bytes

bytesToString

  • bytesToString(bytes: number[] | Uint8Array, offset: number, length: number): string
  • Convert a buffer or array of bytes containing Record V2 data into a string

    Parameters

    • bytes: number[] | Uint8Array

      the bytes to convert

    • offset: number

      the starting position in the buffer

    • length: number

      the number of bytes to convert

    Returns string

    a string representation of the bytes

callWithArguments

  • callWithArguments(fn: (...a: any[]) => any, args: any[]): any
  • Call a function with arguments passed in as an array

    Optimisation of Function.apply for small number of arguments

    Function.apply is more than 20 times slower than direct function calls see https://jsperf.com/function-versus-function-call-versus-function-apply

    Parameters

    • fn: (...a: any[]) => any

      the function to call

        • (...a: any[]): any
        • Parameters

          • Rest ...a: any[]

          Returns any

    • args: any[]

      the arguments in n array

    Returns any

    the return value of the function call

canReadAs

  • Indicates whether a specified topic type can be read as a specified data type.

    Parameters

    Returns boolean

    true if the topic type can be read as the data type

canonicalise

  • canonicalise(path: string): string
  • Provide a canonical representation of a given path, stripping leading and trailing path separators

    Parameters

    • path: string

      the path

    Returns string

    the canonicalised path

cborCost

  • cborCost(i: number): number
  • The CBOR cost of an unsigned integer in bytes. It's cheaper to calculate than flush the encoder and check the number of written bytes.

    Parameters

    • i: number

      the integer to check

    Returns number

    byte cost

checkBounds

  • checkBounds(buffer: Uint8Array, offset: number, length: number): void
  • Parameters

    • buffer: Uint8Array
    • offset: number
    • length: number

    Returns void

checkMultiplicity

  • checkMultiplicity(name: string, min: number, max: number): void
  • Check if min and max values specify a valid multiplicity

    throws

    a SchemaViolationError if min and max values specify an invalid multiplicity

    Parameters

    • name: string

      the name of the Field or Record to check

    • min: number

      the minimum number of times the field should occur within the record

    • max: number

      the maximum number of times the field should occur within the record

    Returns void

checkScale

  • checkScale(name: string, scale: number): void
  • Check if scale values specify a valid multiplicity

    throws

    a SchemaViolationError if scale<1

    Parameters

    • name: string

      the name of the Field

    • scale: number

      the scale of the field (number of decimal places). This must be positive.

    Returns void

cidFromHeaders

  • Get the conversation id from the message headers

    Parameters

    • headers: string[]

      the message headers

    Returns ConversationId

    the conversation ID

coalesce

  • Parameters

    • delegate: EditScript
    • aOffset: number
    • bOffset: number

    Returns CoalescingScript

code

  • Create a new response code

    Parameters

    • id: number

      the respnse code id

    • message: string

      the message

    Returns ResponseCode

    a new response code

collectionToString

  • collectionToString(values: Set<string> | string[]): string
  • Converts a set of values to a canonicalised property string representation, escaping as required.

    Uses comma separators and single quotes.

    Parameters

    • values: Set<string> | string[]

      a set of strings

    Returns string

    a string with each of the members escaped, quoted and concatenated

comparingSequenceNumbers

  • comparingSequenceNumbers(e1: Event<any>, e2: Event<any>): number
  • Compare two Events by their sequence numbers

    Sorts first by originalEvent.sequence. Events with equal originalEvent.sequence are sorted according to their sequence field.

    Parameters

    • e1: Event<any>

      the first event to compare

    • e2: Event<any>

      the second event to compare

    Returns number

    +1 if the first event has a larger sequence number than the second event, -1 otherwise

completeReadUpdateEvent

concatUint8Arrays

  • concatUint8Arrays(arrays: Uint8Array[]): Uint8Array
  • Concatenates multiple Uint8Arrays into a single Uint8Array.

    Parameters

    • arrays: Uint8Array[]

      The arrays to concatenate

    Returns Uint8Array

    The concatenated array

conflatableMatch

  • conflatableMatch(matchStart: number, matchLength: number, insertLength: number): boolean
  • Check if a match should be conflated with an insert

    Parameters

    • matchStart: number

      the starting position of the match

    • matchLength: number

      the number of bytes in the match

    • insertLength: number

      the number of bytes to be instered

    Returns boolean

    true if it is worth conflating a match with an adjacent insert

connect

  • Create a connection request with provided options

    If the result is successful, the fulfilled handler will be called with a Session instance. This session will be in a connected state and may be used for subsequent API calls.

    If the result fails, the rejected handler will be called with an error reason.

    If sessionName and workerJs is supplied, then the call will create a shared session inside a shared WebWorker. If a shared session with that name already exists, this function will return an instance of the existing session. Shared sessions can only be created when running in a browser environment that supports the SharedWorker. For more information regarding shared sessions, see connectShared.

    Example:

    diffusion.connect('example.server.com').then((session) => {
        // Connected with a session
        console.log('Connected!', session);
    }).catch((error) => {
        // Connection failed
        console.log('Failed to connect', error);
    });
    
    throws

    a NullValueError if only one of sessionName or workerJs is undefined or if options is undefined

    throws

    an IllegalArgumentError if the options are invalid.

    Parameters

    • reconnectionTimeout: number
    • Optional principal: undefined | string
    • Optional credentials: Credentials
    • Optional properties: undefined | {}

    Returns InitialConnectionRequest

    a Promise for this operation

connectShared

  • connectShared(sessionName: string, workerJs: string): Promise<Session>
  • Connect to a specified Diffusion server using a shared WebWorker session. This will return a Promise that will complete successfully if a session can be connected, or fail if an error was encountered. Shared sessions can only be created when running in a browser environment that supports the SharedWorker.

    Shared sessions are identified by a name. If a shared session with that name already exists, this function will return an instance of the existing session. Otherwise the call will fail. Sessions can only be shared across scripts originating from a single domain. Otherwise the browser will create independent shared workers resulting in one shared session for each domain.

    The shared session will stay alive as long as there is an open browser tab that initiated a connection through the shared session. When the last tab is closed the shared worker holding the shared session will be terminated. The shared session is also expected to be terminated when the only tab holding a reference to the session is reloaded or experiences a page navigation. The exact behavior may be browser dependent.

    The workerJs argument must be set to the URL of the diffusion-worker.js supplied with the JavaScript distribution. The same-origin policy of the shared worker requires the calling script and the diffusion-worker.js to reside on the same domain.

    If the result is successful, the fulfilled handler will be called with a Session instance. This session will be in a connected state and may be used for subsequent API calls.

    If the result fails, the rejected handler will be called with an error reason.

    Example:

    const options = {
        host : 'localhost',
        port : '8080',
        principal : 'admin',
        credentials : 'password'
    };
    
    diffusion.connect(options, 'some-session', 'diffusion-worker.js').then((session) => {
        console.log('Connected creating new shared session', session);
    }).catch((error) => {
        console.log('Failed to connect', error);
    });
    
    diffusion.connectShared('some-session', 'diffusion-worker.js').then((session) => {
        console.log('Connected to existing shared session', session);
    }.catch((error) => {
        console.log('Failed to connect shared', error);
    });
    
    throws

    an IllegalArgumentError if the options are invalid.

    Parameters

    • sessionName: string

      the name of the shared session

    • workerJs: string

      the location of the diffusion worker script

    Returns Promise<Session>

    a Promise for this operation

connectionActionFromString

  • Get a connection action from a string

    Parameters

    Returns ConnectionAction

    a connection action obtained from the string

connectionActivityMonitorFactory

  • Factory for connection activity monitors.

    Parameters

    Returns ConnectionActivityMonitor

connectionResponse

  • Connection response parser. Wraps the connection response deserialiser and takes callbacks for successful and failed parsing of the buffer.

    Parameters

    Returns ConnectionResponse | null

    the parsed response or null if parsing failed

constructURI

  • Construct a valid websocket URI from the given options.

    Parameters

    Returns string

    the connection URI, without query parameters

corner

  • corner(d: number, length: number): number
  • Limit a diagonal by the length of an input.

    If d is greater than the length, return the diagonal to use instead. This is used to constrain the forward vector entries to an (n+1) * (m+1) rectangle, and the reverse vector entries to an (m+1) * (n+1) rectangle.

    Parameters

    • d: number
    • length: number

    Returns number

create

  • create<Response>(service: Service<Response>): { onRequest: any }
  • Factory for command services, wrapping the service implementation to catch errors and dispatch an appropriate error response to the request callback.

    Type parameters

    • Response

    Parameters

    • service: Service<Response>

      the command service handler function

    Returns { onRequest: any }

    command service wrapper

createRemoteServer

  • createRemoteServer(type: RemoteServerType, name: string, urls: string[], principal: string, connectionOptions: ConnectionOptions, missingTopicNotificationFilter?: undefined | string, connector?: undefined | string): RemoteServer
  • Create a remote server from data

    Parameters

    • type: RemoteServerType
    • name: string
    • urls: string[]
    • principal: string
    • connectionOptions: ConnectionOptions
    • Optional missingTopicNotificationFilter: undefined | string
    • Optional connector: undefined | string

    Returns RemoteServer

createTransport

  • Create the selected transport if enabled.

    Parameters

    • subtransports: {}

      the subtransports that can be made

    • options: OptionsImpl

      the options used to connect

    • name: string

      the name of the subtransport to use

    Returns Transport

    an available transport if enabled

curryR

  • curryR(fn: (...a: any[]) => any, ...args: any[]): (...args: any[]) => any
  • Basic curry-right; provides partial application with arguments on the right

    Parameters

    • fn: (...a: any[]) => any

      the function to call

        • (...a: any[]): any
        • Parameters

          • Rest ...a: any[]

          Returns any

    • Rest ...args: any[]

      the arguments passed to the function as the trailing arguments

    Returns (...args: any[]) => any

    the curried function

      • (...args: any[]): any
      • Parameters

        • Rest ...args: any[]

        Returns any

decimalModelValue

  • decimalModelValue(field: FieldImpl): string
  • Returns a model string representation of the field's data type for the decimal type.

    Parameters

    • field: FieldImpl

      the field providing the type information

    Returns string

    the zero value formatted according to the data type and scale

decode

  • Recursive token-parsing function; will evaluate tokens and build up complete object representations in order.

    throws

    an InvalidDataError if there was an error parsing the next value

    Parameters

    Returns CBORValue

decompressSync

  • decompressSync(input: string | Uint8Array | DataView): Buffer
  • Thin wrapper around zlib.inflateSync

    Parameters

    • input: string | Uint8Array | DataView

      the compressed input

    Returns Buffer

    the decompressed output

defaultValidator

  • defaultValidator(): void
  • A validator that doesn't validate

    Returns void

delayedReconnectionStrategy

  • delayedReconnectionStrategy(delayedReconnectionWindowMs?: number, reconnectionAttemptClamp?: number): ReconnectStrategy
  • A ReconnectStrategy factory function, returning an implementation that uses a randomised and gradually increasing delay. The returned strategy never aborts, nor does it inspect the causal CloseReason. It backs off following a delay pattern of e.g. 0-5s, 5-10s, 10-15s etc. (assuming a delayReconnectionWindowMs of 5000). Upon reaching 'retryClamp', the delay window stops increasing. If the configured reconnect timeout occurs at any time during strategy execution, the returned strategy is aborted.

    Parameters

    • Default value delayedReconnectionWindowMs: number = 5000

      The retry interval window controlling the retry behaviour.

    • Default value reconnectionAttemptClamp: number = 5

      The reconnection attempt at which delay should stop increasing.

    Returns ReconnectStrategy

deltaForAllNewRecords

  • deltaForAllNewRecords(newBytes: Uint8Array, newOffset: number, newLength: number): RecordV2DeltaImpl
  • Create a RecordV2DeltaImpl that contains only new records

    Parameters

    • newBytes: Uint8Array

      the buffer of the new record

    • newOffset: number

      the offset in the buffer of the new record

    • newLength: number

      the number of bytes in the new record

    Returns RecordV2DeltaImpl

    a new RecordV2DeltaImpl

deltaForEmptyNewValue

  • Create a new RecordV2DeltaImpl for an empty value

    Returns RecordV2DeltaImpl

    a new RecordV2DeltaImpl

deltaForOldSingleEmptyRecord

  • deltaForOldSingleEmptyRecord(newBytes: Uint8Array, newOffset: number, newLength: number): RecordV2DeltaImpl
  • Return a delta for when the old value is a single empty record. This assumes that the new record is neither empty nor a single empty record.

    Parameters

    • newBytes: Uint8Array

      the buffer of the new record

    • newOffset: number

      the offset in the buffer of the new record

    • newLength: number

      the number of bytes in the new record

    Returns RecordV2DeltaImpl

    a new RecordV2DeltaImpl

deltaForSingleEmptyRecordNewValue

  • Create a new RecordV2DeltaImpl for a single record with no fields

    Parameters

    • oldRecordCount: number

    Returns RecordV2DeltaImpl

    a new RecordV2DeltaImpl

deserialise

  • Deserialise connection responses according to the V5 protocol.

    Parameters

    • buffer: Uint8Array

      the Uint8Array to deserialise

    Returns ConnectionResponse

detach

  • detach(socket: any): void
  • Detach the handlers of a WebSocket that is no longer used.

    Parameters

    • socket: any

      the WebSocket

    Returns void

diffField

  • diffField(oldBytes: Uint8Array, oldOffset: number, oldLength: number, newBytes: Uint8Array, newOffset: number, newLength: number, result: DiffResult): void
  • Calculate the differences between two fields

    Parameters

    • oldBytes: Uint8Array

      the buffer of the old record

    • oldOffset: number

      the offset in the buffer of the old record

    • oldLength: number

      the number of bytes in the old record

    • newBytes: Uint8Array

      the buffer of the new record

    • newOffset: number

      the offset in the buffer of the new record

    • newLength: number

      the number of bytes in the new record

    • result: DiffResult

      the result recording the difference between the buffers

    Returns void

diffRecord

  • diffRecord(recordIndex: number, oldBytes: Uint8Array, oldOffset: number, oldLength: number, newBytes: Uint8Array, newOffset: number, newLength: number, result: DiffResult): void
  • Calculate the differences between two record entries

    Parameters

    • recordIndex: number

      the index of the record

    • oldBytes: Uint8Array

      the buffer of the old record

    • oldOffset: number

      the offset in the buffer of the old record

    • oldLength: number

      the number of bytes in the old record

    • newBytes: Uint8Array

      the buffer of the new record

    • newOffset: number

      the offset in the buffer of the new record

    • newLength: number

      the number of bytes in the new record

    • result: DiffResult

      the result recording the difference between the buffers

    Returns void

diffRecordFields

  • diffRecordFields(recordIndex: number, oldBytes: Uint8Array, oldOffset: number, oldLength: number, newBytes: Uint8Array, newOffset: number, newLength: number, result: DiffResult): void
  • Calculate the differences between the fields of two record entries

    Parameters

    • recordIndex: number

      the index of the record

    • oldBytes: Uint8Array

      the buffer of the old record

    • oldOffset: number

      the offset in the buffer of the old record

    • oldLength: number

      the number of bytes in the old record

    • newBytes: Uint8Array

      the buffer of the new record

    • newOffset: number

      the offset in the buffer of the new record

    • newLength: number

      the number of bytes in the new record

    • result: DiffResult

      the result recording the difference between the buffers

    Returns void

diffRecords

  • diffRecords(oldBytes: Uint8Array, oldOffset: number, oldLength: number, newBytes: Uint8Array, newOffset: number, newLength: number): DiffResult
  • Calculate the differences between two records

    Parameters

    • oldBytes: Uint8Array

      the buffer of the old record

    • oldOffset: number

      the offset in the buffer of the old record

    • oldLength: number

      the number of bytes in the old record

    • newBytes: Uint8Array

      the buffer of the new record

    • newOffset: number

      the offset in the buffer of the new record

    • newLength: number

      the number of bytes in the new record

    Returns DiffResult

    the difference between the buffers

diffWhenNewIsSingleEmptyField

  • diffWhenNewIsSingleEmptyField(recordIndex: number, oldBytes: Uint8Array, oldOffset: number, oldLength: number, result: DiffResult): void
  • Calculate the differences between two record entries when the new record contains a single empty field

    Parameters

    • recordIndex: number

      the index of the record

    • oldBytes: Uint8Array
    • oldOffset: number
    • oldLength: number
    • result: DiffResult

      the result recording the difference between the buffers

    Returns void

diffWhenOldIsSingleEmptyField

  • diffWhenOldIsSingleEmptyField(recordIndex: number, newBytes: Uint8Array, newOffset: number, newLength: number, result: DiffResult): void
  • Calculate the differences between two record entries when the old record contains a single empty field

    Parameters

    • recordIndex: number

      the index of the record

    • newBytes: Uint8Array
    • newOffset: number
    • newLength: number
    • result: DiffResult

      the result recording the difference between the buffers

    Returns void

drainToBuffer

  • drainToBuffer(messages: Uint8Array[]): Uint8Array
  • Create a single buffer containing multiple messages

    Parameters

    • messages: Uint8Array[]

      the messages to conflate

    Returns Uint8Array

    a single buffer containing all messages

ensureOctetArray

  • ensureOctetArray(value: number[]): void
  • Ensure that the array contains only octet numbers

    throws

    an error if any entry in the array is not a number or out of range

    Parameters

    • value: number[]

      the array to check

    Returns void

entityCount

  • entityCount(bytes: number[] | Uint8Array, offset: number, length: number, mu: number, delimiter: number): number
  • Count the number of records or fields in the raw Record V2 data

    Parameters

    • bytes: number[] | Uint8Array

      the bytes to check

    • offset: number

      the starting position in the buffer

    • length: number

      the number of bytes to convert

    • mu: number

      the token indicating an empty set

    • delimiter: number

      the token separating two entities

    Returns number

    the number of records in the data

enumerize

  • enumerize<T>(obj: T): void
  • Add reverse lookup to an enum-like object in order to imitate TypeScript style enums. Each value must be an object that defines a numeric id property.

    Example:

    const enumLike = {
      FOO: { id: 0, msg: 'This is a Foo'},
      BAR: { id: 1, msg: 'This is a Bar'}
    }
    
    enumerize(enumLike);
    
    // enumLike = {
    //  FOO: { id: 0, msg: 'This is a Foo'},
    //  BAR: { id: 1, msg: 'This is a Bar'},
    //  0: 'FOO',
    //  1: 'BAR'
    // }
    

    Type parameters

    • T: {}

    Parameters

    • obj: T

      the enum-like object

    Returns void

escape

  • escape(s: string): string
  • Inserts an escape character '' before any of the special characters ' " or .

    Parameters

    • s: string

      the string to be escaped

    Returns string

    the string value with escape characters inserted as appropriate

escapeKey

  • escapeKey(key: string): string
  • Escape special characters in the JSON pointer key string

    Parameters

    • key: string

      the key string to escape

    Returns string

    the escaped string

eventToBytes

  • A converter function that converts an event to bytes data

    Type parameters

    • V

    Parameters

    • valueToBytes: (value: V) => BytesImpl

      a converter function that converts an underlying value to bytes data

    • event: Event<V>

      the event to convert

    Returns BytesImpl

    the bytes containing the event

extractCommonPrefix

  • Extract the longest common prefix from a set of topic selectors

    Parameters

    Returns string

    the longest common prefix

extractPrefixFromRegex

  • extractPrefixFromRegex(remainder: string): string
  • Extract the largest possible topic path prefix from a string that may contain a regular expression.

    Parameters

    • remainder: string

      The remainder (i.e expression minus prefix)

    Returns string

    The maximum topic path that could be extracted

fieldCount

  • fieldCount(bytes: number[] | Uint8Array, offset: number, length: number): number
  • Count the number of fields in the raw Record V2 data

    Parameters

    • bytes: number[] | Uint8Array

      the bytes to check

    • offset: number

      the starting position in the buffer

    • length: number

      the number of bytes to convert

    Returns number

    the number of fields in the data

fieldEquals

  • fieldEquals(oldBytes: Uint8Array, oldOffset: number, newBytes: Uint8Array, newOffset: number, length: number): boolean
  • Check if two non-empty fields are equal

    Parameters

    • oldBytes: Uint8Array

      the buffer of the old record

    • oldOffset: number

      the offset in the buffer of the old record

    • newBytes: Uint8Array

      the buffer of the new record

    • newOffset: number

      the offset in the buffer of the new record

    • length: number

    Returns boolean

    true if the two fields are equal

fieldsAreEqual

  • fieldsAreEqual(oldBytes: Uint8Array, oldOffset: number, oldLength: number, newBytes: Uint8Array, newOffset: number, newLength: number): boolean
  • Check if two fields are equal. The fields may be empty.

    Parameters

    • oldBytes: Uint8Array

      the buffer of the old record

    • oldOffset: number

      the offset in the buffer of the old record

    • oldLength: number

      the number of bytes in the old record

    • newBytes: Uint8Array

      the buffer of the new record

    • newOffset: number

      the offset in the buffer of the new record

    • newLength: number

      the number of bytes in the new record

    Returns boolean

    true if the two fields are equal

fill

  • fill<T>(array: T[], value: T, start?: number, end?: number): void
  • Fill an array with a given value, within an optional range

    Type parameters

    • T

    Parameters

    • array: T[]

      the array to fill

    • value: T

      the value to fill the array with

    • Default value start: number = 0

      optional range start

    • Default value end: number = array.length

      optional range end

    Returns void

filterTransports

  • filterTransports(requestedTransports: string[], subtransports: {}): string[]
  • Filter a list of transport names, removing any unknown or disabled transports.

    Parameters

    • requestedTransports: string[]

      array of transport names

    • subtransports: {}

      the available subtransports

    Returns string[]

    the filtered array of transport names

findDelimiter

  • findDelimiter(bytes: number[] | Uint8Array, startIndex: number, endIndex: number, delimiter: number): number
  • Find a delimiter in the raw Record V2 data. Returns the position of the within the range [startIndex, endIndex). If the delimiter is not found, endIndex will be returned.

    Parameters

    • bytes: number[] | Uint8Array

      the bytes to check

    • startIndex: number

      the first index to begin searching

    • endIndex: number

      the last index to stop searching

    • delimiter: number

      the delimiter to search for

    Returns number

    the index of the delimiter

findNextPowerOfTwo

  • findNextPowerOfTwo(value: number): number
  • Find the next integer, equal or higher to the value, which is a power of two.

    throws

    an IllegalArgumentError if the value is negative or greater than 2^30

    Parameters

    • value: number

      the value to search from

    Returns number

    the next power of two

format

  • Parameters

    Returns string

fromValue

  • Create a new BinaryImpl object from a buffer or BinaryImpl. If a BinaryImpl is passed as argument it is simply returned.

    throws

    an error if an incompatible datatype was supplied

    Parameters

    • value: Binary | Uint8Array

      the object to create a JSON from

    Returns BinaryImpl

    the record created

getComponents

  • Extract a component group from a single expression

    Parameters

    • expression: string

      the selector expression

    Returns TopicPathComponents

    an object containing parsed properties

getEnvironmentString

  • getEnvironmentString(): string
  • Queries the current environment and returns a string that can be used to set the $Environment session property.

    Returns string

    The environment string

getF

  • getF(v: number[], k: number): number
  • Parameters

    • v: number[]
    • k: number

    Returns number

getHeaderString

  • getHeaderString(message: Message): string
  • Construct a header string

    Parameters

    • message: Message

      the message from which to construct the header string

    Returns string

    the string to be serialised in the header

getInt32

  • getInt32(buffer: Uint8Array, high: boolean): number
  • Read a 32 bit integer from the buffer

    Parameters

    • buffer: Uint8Array

      the buffer to write into

    • high: boolean

      a flag indicating whether to read the high or the low bits of the buffer

    Returns number

    the integer that was read from the buffer

getR

  • getR(v: number[], k: number): number
  • Parameters

    • v: number[]
    • k: number

    Returns number

getType

  • getType(expression: string): Type | null
  • Determine the Topic Selector type of a given expression.

    throws

    an IllegalArgumentError if the expression is invalid

    Parameters

    • expression: string

      the selector expression

    Returns Type | null

    the topic selector type, or null

hasValidCharacters

  • hasValidCharacters(path: string, query?: string, fragment?: string): boolean
  • Parameters

    • path: string
    • Default value query: string = ""
    • Default value fragment: string = ""

    Returns boolean

identity

  • identity<T>(val: T): T
  • The identity function

    Type parameters

    • T

    Parameters

    • val: T

      a value

    Returns T

    the input value val

int64Replacer

  • int64Replacer(key: string, value: any): any
  • Replacer function for JSON.stringify that replaces Int64Impl objects with their string representation

    Parameters

    • key: string

      the object key (this argument is ignored)

    • value: any

      the value to replace

    Returns any

    if value is an Int64Impl then the string representation is returned. Otherwise value is returned unchanged.

isAny

  • isAny(): boolean
  • Allow any CBOR types

    Returns boolean

    will always return true

isDouble

  • isDouble(cborType: types): boolean
  • Allow only floating point CBOR types

    Parameters

    • cborType: types

      the CBOR type

    Returns boolean

    true if the type is a floating point number

isEqualUint8Arrays

  • isEqualUint8Arrays(a: Uint8Array, b: Uint8Array): boolean
  • Compares two Uint8Arrays for equality.

    Parameters

    • a: Uint8Array

      The first Uint8Array

    • b: Uint8Array

      The second Uint8Array

    Returns boolean

    True if the arrays are equal, false otherwise

isEqualityOperator

  • Checks if an UpdateConstraintOperator is comparing equality

    Parameters

    Returns boolean

isInt64

  • isInt64(cborType: types): boolean
  • Allow only int CBOR types

    Parameters

    • cborType: types

      the CBOR type

    Returns boolean

    true if the type is an integer

isObjectAs

  • isObjectAs<T>(o: any): o is T
  • Cheap type guard for a specific type

    Check is a variable is an object and assume that it is of a given type

    Type parameters

    • T

      the type that is assumed if o is an object

    Parameters

    • o: any

      the object to check

    Returns o is T

    true if o is an object

isPartOf

  • Check if a BufferSlice contains the same bytes as the original Bytes

    Parameters

    • original: BytesImpl

      the original bytes

    • other: BufferSlice

      the buffer to compare to

    • start: number

      the offset of the first byte to compare in the buffer

    • length: number

      the number of bytes to compare

    Returns boolean

    true if the slice of the other buffer is equal to the bytes contained in original

isQuote

  • isQuote(c: string): boolean
  • check if the string is a quote mark

    Parameters

    • c: string

      the string to check

    Returns boolean

    true if the string is either a single ' or double " quote

Const isRetryStrategyController

  • isRetryStrategyController(retryStrategy: unknown): retryStrategy is RetryControllerImpl
  • Type guard helper, for use when handling RetryStrategy param

    Parameters

    • retryStrategy: unknown

    Returns retryStrategy is RetryControllerImpl

isSecureScheme

  • isSecureScheme(scheme: string): boolean | undefined
  • Parameters

    • scheme: string

    Returns boolean | undefined

isSingleEmptyRecord

  • isSingleEmptyRecord(bytes: number[] | Uint8Array, offset: number, length: number): boolean
  • Checks if the data contains a single empty record

    Parameters

    • bytes: number[] | Uint8Array

      the bytes to check

    • offset: number

      the starting position in the buffer

    • length: number

      the number of bytes to convert

    Returns boolean

    true if the data contains a single empty record

isString

  • isString(cborType: types): boolean
  • Allow only string CBOR types

    Parameters

    • cborType: types

      the CBOR type

    Returns boolean

    true if the type is a string

isStructEnd

  • isStructEnd(token: tokens): boolean
  • Utility function to check for ending tokens of arrays, maps, or strings

    Parameters

    • token: tokens

      the token to check

    Returns boolean

    true if the token ends a structure

isStructStart

  • isStructStart(token: tokens): boolean
  • Utility function to check for starting tokens of arrays, maps, or strings

    Parameters

    • token: tokens

      the token to check

    Returns boolean

    true if the token starts a structure

isSuccess

  • Check if the response code indicates a success

    Parameters

    Returns boolean

    true if the response code indicates a success

isTopicPath

  • Determine if a component group can be treated as a topic path.

    Parameters

    Returns boolean

    if the components represent a topic path selector

isTypedArray

  • isTypedArray(obj?: any): obj is TypedArray
  • Check if the argument is a typed array

    Parameters

    • Optional obj: any

      the object to check

    Returns obj is TypedArray

    true if the object is an instance of a typed array

isUint8Array

  • isUint8Array(value: any): value is Uint8Array
  • Tests if a value is a Uint8Array.

    Parameters

    • value: any

      value to test

    Returns value is Uint8Array

    whether value is a Uint8Array

isValidHost

  • isValidHost(host: string): boolean
  • Parameters

    • host: string

    Returns boolean

isWhatwgHost

  • isWhatwgHost(host: string): boolean
  • Whether the WHATWG URL parser, which the ws library uses, accepts the host.

    Parameters

    • host: string

    Returns boolean

isZlibBundleLoaded

  • isZlibBundleLoaded(): boolean
  • Check if the zlib library is installed

    Returns boolean

    true if the zlib module is provided

key

  • The loop detection key: paths are compared decoded, so every spelling of a path is equal.

    Parameters

    Returns string

keyF

  • keyF(k: number): number
  • Parameters

    • k: number

    Returns number

keyR

  • keyR(k: number): number
  • Parameters

    • k: number

    Returns number

leadingZeros

  • leadingZeros(i: number): number
  • Calculate the number of leading zeros in the binary representation of a number using the minimal amount of bit-shifting

    Parameters

    • i: number

      the number to analyse

    Returns number

    the number of leading binary zeros

limitTimeout

  • limitTimeout(description: string, supplied: number): number
  • Limit timeouts to an hour.

    Parameters

    • description: string
    • supplied: number

    Returns number

Const log

  • log(level: LoggingLevel, prefix: string): (...msg: any[]) => void
  • Verbose logging output

    Adds date, level information and prfix information to logging output

    Parameters

    • level: LoggingLevel

      the log level to use

    • prefix: string

      the prefix

    Returns (...msg: any[]) => void

    a logging function that writes verbose output

      • (...msg: any[]): void
      • Parameters

        • Rest ...msg: any[]

        Returns void

mask

  • mask(p: number, capacity: number): number
  • Apply a bitmask to a number to calculate the modulo of a power of two. This is used to determine the position in a circular buffer

    Parameters

    • p: number

      the number to mask

    • capacity: number

      the capacity, must be a power of two

    Returns number

    the reduced value

masked

  • masked(url: string): string
  • Returns a URL with its user information, query and fragment masked, and characters other than printable ASCII escaped.

    Parameters

    • url: string

      the URL or URI reference

    Returns string

    the masked form

memoize

  • memoize(f: (...args: any[]) => any, cache: Map<string, any>, matcher?: (args: any[]) => string): c
  • Wrap a function with an automatic memoization layer.

    Parameters

    • f: (...args: any[]) => any
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    • cache: Map<string, any>

      the internal cache to use.

    • Default value matcher: (args: any[]) => string = JSON.stringify

      the matcher function to return a cache key from an array of arguments

        • (args: any[]): string
        • Parameters

          • args: any[]

          Returns string

    Returns c

    the memoized function

newBranchMappingTableBuilder

newRemoteServerBuilder

newSessionEventParametersBuilder

newSessionMetricCollectorBuilder

newTopicMetricCollectorBuilder

nextF

  • nextF(v: number[], k: number): number
  • Parameters

    • v: number[]
    • k: number

    Returns number

nextR

  • nextR(v: number[], k: number): number
  • Parameters

    • v: number[]
    • k: number

    Returns number

nonNull

  • nonNull(e: Event<any> | null): boolean
  • Check is a value is not null or undefined

    Parameters

    • e: Event<any> | null

      the value to check

    Returns boolean

    true if the value is truthy

normal

  • normal(c: string): boolean
  • Validate characters in a normal parsing mode

    Parameters

    • c: string

      the character to check

    Returns boolean

    true if the character is a normal path character

normalise

  • normalise(field: FieldImpl, value: string): string
  • Returns a validated value in the format indicated by the field

    throws

    a SchemaViolationError if the value is invalid

    Parameters

    • field: FieldImpl

      the field providing the type information

    • value: string

      the value to convert

    Returns string

    a string representation of the value

ofSize

  • ofSize<T>(size: number, initialValue?: T): T[]
  • Create an array of a given size, optionally pre-filled with a specified initial value.

    Type parameters

    • T

    Parameters

    • size: number

      the size of the array to create

    • Optional initialValue: T

      if specified, the initial will be assigned to each element

    Returns T[]

parse

  • Parse a message from a buffer

    Parameters

    • buffer: Uint8Array

      the buffer to parse

    • callback: MessageCallback

      a callback that is called when the message has been parsed or an error has occurred.

    Returns void

    an array of records, each containing an array of fields

parseClientTopicMessage

  • Helper function to create a client topic message

    Parameters

    Returns void

parseSelector

parseServiceMessage

  • Helper function to create a service message

    Parameters

    Returns Message

    the newly constructed message

processEnd

  • processEnd(bytes: Uint8Array, records: RecordData[], startPos: number, endPos: number, fields: RecordData): void
  • Process the end of the record data

    Parameters

    • bytes: Uint8Array

      the buffer to parse

    • records: RecordData[]

      a reference to the records that will be constructed. A new record will be added to this array.

    • startPos: number

      the start position in the buffer of the last field

    • endPos: number

      the end position in the buffer of the last field

    • fields: RecordData

    Returns void

processRecordDelimiter

  • processRecordDelimiter(bytes: Uint8Array, records: RecordData[], startPos: number, endPos: number, fields: RecordData): void
  • Process a record delimiter

    Parameters

    • bytes: Uint8Array

      the buffer to parse

    • records: RecordData[]

      a reference to the records that will be constructed. A new record will be added to this array.

    • startPos: number

      the start position in the buffer of the last field

    • endPos: number

      the end position in the buffer of the last field

    • fields: RecordData

    Returns void

putInt32

  • putInt32(value: number, buffer: Uint8Array, high: boolean): void
  • Store a 32 bit integer in the buffer

    Parameters

    • value: number

      the 32 bit integer to store

    • buffer: Uint8Array

      the buffer to write into

    • high: boolean

      a flag indicating whether to store the integer in the high or the low bits of the buffer

    Returns void

putNegativeNumber

  • putNegativeNumber(value: number, buffer: Uint8Array): void
  • Store a negative number in the buffer

    Parameters

    • value: number

      the number to store

    • buffer: Uint8Array

      the buffer to write into

    Returns void

putPositiveNumber

  • putPositiveNumber(value: number, buffer: Uint8Array): void
  • Store a positive number in the buffer

    Parameters

    • value: number

      the number to store

    • buffer: Uint8Array

      the buffer to write into

    Returns void

putString

  • putString(value: string, radix: number, buffer: Uint8Array): void
  • Store an integer represented by a string in the buffer

    Parameters

    • value: string

      the string containing the number to store

    • radix: number

      the radix of the number representation

    • buffer: Uint8Array

      the buffer to write into

    Returns void

quoted

  • quoted(): boolean
  • Validated characters within a quoted block (\Q \E)

    Returns boolean

    true

rangeQueryFactory

read

  • Read an enum from a byte reader

    The enum values must all lie between 0 and 63 inclusive.

    The enum values must all lie between 0 and 63 inclusive.

    throws

    an IllegalArgumentError if the value read is not a valid enum value

    Type parameters

    • T

    Parameters

    • input: ByteReader

      the input stream

    • enumType: any

      the enum type

    Returns T

    the value read from the stream if it is a valid enum value

readAuthorEncoding

  • Read the author encoding an store it in the codeToAuthor map

    Parameters

    • bis: BufferInputStream

      the input stream

    • codeToAuthor: {}

      a mapping between author codes and authors

      • [code: string]: string

    Returns void

readBoolean

  • Read a boolean value

    Parameters

    Returns boolean

    the boolean that was read

readBranchMapping

  • Parameters

    Returns BranchMapping

readByte

  • Read a single byte from the input

    throws

    an error if no more data is available

    Parameters

    Returns number

    the next byte in the input stream

readBytes

  • Read bytes as a Uint8Array

    Parameters

    Returns Uint8Array

    the bytes that were read

readCollection

  • Read a collection of objects, using a specific reader function

    Type parameters

    • T

      the type of data in the collection

    Parameters

    Returns T[]

    an array of read values

readDictionary

  • Read a dictionary of strings and values of a given type

    Type parameters

    • T

      the type of data stored in the dictionary

    Parameters

    Returns {}

    a dictionary of values

    • [key: string]: T

readDouble

  • Parameters

    Returns number

readDoubleBE

  • readDoubleBE(buffer: Uint8Array, offset: number): number
  • Reads a 64-bit double from a Uint8Array.

    Parameters

    • buffer: Uint8Array

      The buffer to read from

    • offset: number

      The offset in the buffer to read from

    Returns number

    The read number

readEditEvent

  • Read an edit event from an input stream

    Type parameters

    • V

    Parameters

    • bytesToValue: (bytes: Uint8Array) => V

      a converter function that converts a byte data to a value

        • (bytes: Uint8Array): V
        • Parameters

          • bytes: Uint8Array

          Returns V

    • input: BufferInputStream

      the input stream

    Returns EventImpl<V>

    the event that was read from the stream

readFetchTopicResult

readFloatBE

  • readFloatBE(buffer: Uint8Array, offset: number): number
  • Reads a 32-bit float from a Uint8Array.

    Parameters

    • buffer: Uint8Array

      The buffer to read from

    • offset: number

      The offset in the buffer to read from

    Returns number

    The read number

readInt32

  • Read an encoded Int32

    throws

    an error if an int32 is malformed and cannot be read

    Parameters

    Returns number

    the Int32 that was read

readInt32BE

  • readInt32BE(buffer: Uint8Array, offset: number): number
  • Reads a signed 32-bit integer from a Uint8Array.

    Parameters

    • buffer: Uint8Array

      The buffer to read from

    • offset: number

      The offset in the buffer to read from

    Returns number

    The read integer

readInt64

  • Read an encoded Int64

    This will return the value as a Long instance.

    throws

    an error if an int64 is malformed and cannot be read

    Parameters

    Returns Long

    the decoded Int64, represented as Long

readInt8

  • readInt8(buffer: Uint8Array, offset: number): number
  • Reads an 8-bit integer from a Uint8Array.

    Parameters

    • buffer: Uint8Array

      The buffer to read from

    • offset: number

      The offset in the buffer to read from

    Returns number

    The read integer

readMap

readMetadata

  • Read event metadata

    Parameters

    • input: BufferInputStream
    • offsets: Offsets

      the offsets of the range in the result

    • codeToAuthor: {}

      a mapping between author codes and authors

      • [code: string]: string

    Returns EventMetadataImpl

    the metadata that was read

readMetadataOffsets

  • Read time series offsets

    Parameters

    Returns Offsets

    the offsets of the range in the result that were read

readMetricAlertResult

  • Parameters

    Returns MetricAlertResult

readMetricSample

  • Parameters

    Returns MetricSample

readMetricSampleCollection

readMetricSampleCollections

readObject

readOptional

  • Read an optional value

    This will read a leading byte indicating whether the value is present (1) or not (0).

    Type parameters

    • T

    Parameters

    Returns T | undefined

  • Read an optional value

    This will read a leading byte indicating whether the value is present (1) or not (0).

    Type parameters

    • T

    Parameters

    Returns T | null

  • Read an optional value

    This will read a leading byte indicating whether the value is present (1) or not (0).

    Type parameters

    • T

    Parameters

    Returns T

readOriginalEvent

  • Read an original event from an input stream

    Type parameters

    • V

    Parameters

    • bytesToValue: (bytes: Uint8Array) => V

      a converter function that converts a byte data to a value

        • (bytes: Uint8Array): V
        • Parameters

          • bytes: Uint8Array

          Returns V

    • input: BufferInputStream

      the input stream

    Returns EventImpl<V>

    the event that was read from the stream

readPoint

  • Read a Point from the stream

    Parameters

    Returns Point

    the Point that was read

readProperties

  • Read a property map from the stream

    Parameters

    Returns {}

    the property map that was read

    • [key: string]: string

readRange

  • Read a Range from the stream

    Parameters

    Returns Range

    the Range that was read

readRemoteServer

  • Read a remote server from the stream

    Parameters

    Returns RemoteServer

    the RemoteServer that was read

readRemoteServerStatus

readSession

  • Read a session property map from the stream

    Parameters

    Returns SessionProperties

    the property map that was read

readSessionToken

  • Read a SessionToken

    Parameters

    Returns SessionToken

    a new session token

readSizeInfo

readString

  • Read a UTF-8 encoded String

    Parameters

    Returns string

    the string that was read

readStringArrayMap

readStringTopicSelection

readTopicView

  • Read a topic view from the stream

    Parameters

    Returns TopicView

    the TopicView that was read

readUInt16BE

  • readUInt16BE(buffer: Uint8Array, offset: number): number
  • Reads an unsigned 16-bit integer from a Uint8Array.

    Parameters

    • buffer: Uint8Array

      The buffer to read from

    • offset: number

      The offset in the buffer to read from

    Returns number

    The read integer

readUInt32BE

  • readUInt32BE(buffer: Uint8Array, offset: number): number
  • Reads an unsigned 32-bit integer from a Uint8Array.

    Parameters

    • buffer: Uint8Array

      The buffer to read from

    • offset: number

      The offset in the buffer to read from

    Returns number

    The read integer

reconnect

  • reconnect(token: string, availableClientSequence: number, lastServerSequence: number): ReconnectionRequest
  • Create a reconnection request with provided options

    Parameters

    • token: string

      the session token

    • availableClientSequence: number

      the available client sequence number

    • lastServerSequence: number

      the last server sequence number

    Returns ReconnectionRequest

    a new reconnection request

recordCount

  • recordCount(bytes: number[] | Uint8Array, offset: number, length: number): number
  • Count the number of records in the raw Record V2 data

    Parameters

    • bytes: number[] | Uint8Array

      the bytes to check

    • offset: number

      the starting position in the buffer

    • length: number

      the number of bytes to convert

    Returns number

    the number of records in the data

recordIsSingleEmptyField

  • recordIsSingleEmptyField(bytes: number[] | Uint8Array, offset: number, length: number): boolean
  • Checks if the data contains a single empty field

    Parameters

    • bytes: number[] | Uint8Array

      the bytes to check

    • offset: number

      the starting position in the buffer

    • length: number

      the number of bytes to convert

    Returns boolean

    true if the data contains a single empty field

redirectTarget

regex

  • regex(s: string | RegExp, context?: string): Matcher
  • Create a regex matcher function for a given regex expression, with an optional context for RegEx construction error messages.

    The returned function will evaluate the generated regex across the entire region of the given input. This is equivalent to Matcher.matches in Java.

    throws

    an IllegalArgumentError if the regex couldn't be created

    Parameters

    • s: string | RegExp

      the regular expression

    • Default value context: string = ""

      the optional context message

    Returns Matcher

    the tester function

registerHandler

  • Register a handler with the conversation set.

    Type parameters

    • Parameters

    Parameters

    • internal: InternalSession

      the internal session

    • params: Parameters

      the registration parameters to send to the server

    • adapter: RegistrationAdapter

      the registration adapter

    • reg: ServiceDefinition<{ cid: ConversationId; params: Parameters }, null>

      the registration service that is used to register with the server

    • dereg: ServiceDefinition<Parameters, null>

      the deregistration service that is used to deregister with the server

    Returns Promise<void>

registerRequestHandler

registerTopicHandler

  • Register a handler for topic control notifications

    Parameters

    Returns Promise<void>

registrationCallback

  • registrationCallback(conversationSet: ConversationSet, cid: ConversationId, resolve: () => void, reject: (err: any) => void): (err: any) => void
  • Create a registration callback function

    Parameters

    • conversationSet: ConversationSet

      the conversation set

    • cid: ConversationId

      the conversation ID

    • resolve: () => void
        • (): void
        • Returns void

    • reject: (err: any) => void
        • (err: any): void
        • Parameters

          • err: any

          Returns void

    Returns (err: any) => void

    a new registration callback function

      • (err: any): void
      • Parameters

        • err: any

        Returns void

remove

  • remove<T>(array: T[], element: T): boolean
  • Remove an element from an array.

    Type parameters

    • T

      the type of the elements stored in the array

    Parameters

    • array: T[]
    • element: T

      the object to remove

    Returns boolean

    true if the element was present in the array

removeDotSegments

  • removeDotSegments(path: string): string
  • RFC 3986 section 5.2.4 for an empty path or one that starts with '/'.

    Parameters

    • path: string

    Returns string

replace

  • Create a delta that contains only the new value

    Parameters

    Returns BinaryDeltaImpl

    the resulting delta

replaceWithLatest

  • replaceWithLatest(allEvents: Array<Event<any>>): (Anonymous function)
  • Get a function that replaces an Event with the latest event in the same sequence.

    Parameters

    • allEvents: Array<Event<any>>

      an array of events to act as original events in the sequence

    Returns (Anonymous function)

    a function that replaces events

requireNonNegative

  • requireNonNegative(i: number | null | undefined, what: string): number
  • Require that a number is defined and is not negative

    throws

    an IllegalArgumentError if the number is negative

    throws

    a NullValueError if the number is null or undefined

    Parameters

    • i: number | null | undefined

      the number to check

    • what: string

      a description of the number to check

    Returns number

    the number

requireNonNegativeInt

  • requireNonNegativeInt(i: number | null | undefined, what: string): number
  • Require that a number is defined and is not negative

    throws

    an IllegalArgumentError if the number is negative

    throws

    a NullValueError if the number is null or undefined

    Parameters

    • i: number | null | undefined

      the number to check

    • what: string

      a description of the number to check

    Returns number

    the number

requireNonNegativeLong

  • requireNonNegativeLong(n: number | Long, parameter: string): Long
  • Parameters

    • n: number | Long
    • parameter: string

    Returns Long

requireNonNull

  • requireNonNull<T>(value: T | null | undefined, what: string): T
  • Throw an error if the checked value is null/undefined.

    throws

    a NullValueError if value is null or undefined

    Type parameters

    • T

    Parameters

    • value: T | null | undefined

      the value to check

    • what: string

      description to include in thrown error

    Returns T

    the checked value

resolve

  • RFC 3986 section 5.2.2, as the Java client's DiffusionURI.resolveRedirect applies it, with the character rules of java.net.URI.

    Parameters

    Returns WebSocketTarget | undefined

    the target, or undefined if the Location is invalid

resolveAuthority

  • resolveAuthority(secure: boolean, authority: string, path: string, query?: undefined | string): WebSocketTarget | undefined
  • Resolves a Location with an authority.

    Parameters

    • secure: boolean
    • authority: string
    • path: string
    • Optional query: undefined | string

    Returns WebSocketTarget | undefined

resolveFieldIndex

  • Get the absolute index of a field in the schema

    throws

    an OutOfBoundsError if the index is not found

    Parameters

    • field: FieldImpl

      the field to inspect

    • fields: FieldData[]

      the array of field that contains the record

    • index: number

      an index offset

    Returns number

    the absolute index of the field in the schema

resolvePath

  • Resolves a Location with no scheme or authority.

    Parameters

    Returns WebSocketTarget

resolveRecordIndex

  • Get the absolute index of a record in the schema

    throws

    an OutOfBoundsError if the index is not found

    Parameters

    • record: RecordImpl

      the record to inspect

    • records: RecordData[]

      the array of records that contains the record

    • index: number

      an index offset

    Returns number

    the absolute index of the record in the schema

responseHandler

  • Create a new response handler

    Type parameters

    • Response

    Parameters

    Returns ResponseHandler

    a new response handler

responseSuccess

  • responseSuccess<Response>(err: any, response: Response | undefined): response is Response
  • Type guard for responses from a ServiceSender.

    Type parameters

    • Response

    Parameters

    • err: any

      the response error, if present

    • response: Response | undefined

      the response data

    Returns response is Response

    returns true if the error is falsy. In this case, the ServiceSender should have called the response callback with a valid response.

rolesToString

  • rolesToString(roles: Set<string> | string[]): string
  • Utility method which converts a set of authorisation roles to the string format required by the $Roles session property.

    since

    6.2

    Parameters

    • roles: Set<string> | string[]

      a set of roles

    Returns string

    a string representing the supplied roles, formatted as required by the $Roles session property

roundTimeStamp

  • roundTimeStamp(timestamp: number): number
  • Reduce the accuracy of a timestamp

    Parameters

    • timestamp: number

      the time stamp to round

    Returns number

    the reduced accuracy time stamp

serialise

  • serialise(value: number | undefined | null, encoder: Encoder): void
  • Serialise an double value into a CBOR encoder

    Parameters

    • value: number | undefined | null

      the value to serialise

    • encoder: Encoder

      the encoder

    Returns void

serialiseConnectionRequest

  • Serialise connection requests according to protocol 31.

    Parameters

    Returns Uint8Array

setDefaultReconnectStrategy

  • Facility to change the default strategy used by the OptionsImpl constructor. (Test motivation predominantly.)

    Parameters

    • strategy: ReconnectStrategy

      The strategy to use, when creating an OptionsImpl, and non is otherwise provided.

    Returns void

setF

  • setF(v: number[], k: number, i: number): void
  • Parameters

    • v: number[]
    • k: number
    • i: number

    Returns void

setR

  • setR(v: number[], k: number, i: number): void
  • Parameters

    • v: number[]
    • k: number
    • i: number

    Returns void

split

  • split(path: string): string[]
  • Split a path into parts.

    This differs from String.split in two ways:

    • If the input string is empty, this function will return an empty array, not a single-element array containing an empty string.
    • The string will be split into substrings that terminate with the specified delimiter, rather than splitting immediately when a delimiter is found.

    Example:

    split("foo/bar/", "/"); // Returns ["foo", "bar"];
    

    Example:

    split("foo///", "//"); // Returns ["foo/"];
    

    Parameters

    • path: string

      the path

    Returns string[]

    the parts

stringToArray

  • stringToArray(stringValue: string): string[]
  • Converts a formatted multi value property to an array.

    Unescapes any escaped characters in the string.

    throws

    an IllegalArgumentError if the input is not correctly quoted

    Parameters

    • stringValue: string

      the string with quoted substrings separated by whitespace or commas

    Returns string[]

    array of strings

stringToRoles

  • stringToRoles(s: string): Set<string>
  • Utility method which converts a string of the format required by the $Roles session property into a mutable set of strings.

    throws

    an error if the argument is null or undefined

    throws

    an IllegalArgumentError if the input is not correctly quoted

    since

    6.2

    Parameters

    • s: string

      the string with quoted roles separated by whitespace or commas

    Returns Set<string>

    set of roles

stringToSet

  • stringToSet(stringValue: string): Set<string>
  • Converts a formatted multi value property to an immutable set.

    Unescapes any escaped characters in the string.

    throws

    an IllegalArgumentError if the input is not correctly quoted

    Parameters

    • stringValue: string

      the string with quoted substrings separated by whitespace or commas

    Returns Set<string>

    set of strings

toBuffer

  • Write record data to a buffer

    Parameters

    Returns Uint8Array

    the buffer containing the serialised data

toJSON

  • Convert the record schema to a raw data object

    Parameters

    Returns RecordData

    a data object that can be serialised with using JSON

uint8FromBinary

  • uint8FromBinary(str: string): Uint8Array
  • Creates a Uint8Array from a binary string.

    Parameters

    • str: string

      The binary string

    Returns Uint8Array

    A new Uint8Array

uint8FromDoubleBE

  • uint8FromDoubleBE(val: number): Uint8Array
  • Creates a Uint8Array from a 64-bit double.

    Parameters

    • val: number

      The double value

    Returns Uint8Array

    A new Uint8Array

uint8FromUtf8

  • uint8FromUtf8(str: string): Uint8Array
  • Creates a Uint8Array from a utf-8 string.

    Parameters

    • str: string

      The utf-8 string

    Returns Uint8Array

    A new Uint8Array

uint8ToAscii

  • uint8ToAscii(val: Uint8Array): string
  • Converts a Uint8Array to a binary string.

    Parameters

    • val: Uint8Array

      The Uint8Array to convert

    Returns string

    A binary string

uint8toUtf8

  • uint8toUtf8(val: Uint8Array, startPos?: number, endPos?: number): string
  • Converts a Uint8Array to a utf-8 string.

    Parameters

    • val: Uint8Array

      The Uint8Array to convert

    • Default value startPos: number = 0
    • Default value endPos: number = val.length

    Returns string

    A utf-8 string

updateConstraints

  • Returns an update constraint factory.

    function

    diffusion#updateConstraints

    since

    6.2

    Returns UpdateConstraintFactory

    update constraint factory

validateField

  • Validate Record V2 model data of a single field against the schema field

    throws

    an InvalidDataError if the model data is found to be invalid

    Parameters

    • schemaRecord: RecordImpl

      the field schema to validate against

    • recordIndex: number

      the record index

    • schemaField: FieldImpl
    • index: number

      the field index

    • value: FieldData

      the field model data

    Returns void

validateModel

  • Validate Record V2 model data against a schema

    throws

    an InvalidDataError if the model data is found to be invalid

    Parameters

    Returns void

validateRecord

  • Validate Record V2 model data of a single record against the schema record

    throws

    an error if the model data is found to be invalid

    Parameters

    • schemaRecord: RecordImpl

      the record schema to validate against

    • recordIndex: number

      the record index

    • record: RecordData

      the individual record data

    Returns void

validateSelectionScope

  • validateSelectionScope(scope: string): void
  • Validate the a topic selection scope.

    throws

    IllegalArgumentError if the scope starts with the character $

    Parameters

    • scope: string

      the scope to validate

    Returns void

websocketSubTransportFactoryProvider

  • Optionally environment specific websockets.

    Returns Subtransport

withQuery

  • withQuery(url: string, query: string): string
  • Returns a URL with query parameters added to its own.

    Parameters

    • url: string

      the URL

    • query: string

      the encoded query parameters to add, or an empty string

    Returns string

    the URL with the query parameters

write

  • Write record data to an output stream

    Parameters

    Returns void

writeBoolean

  • Write a boolean value

    Parameters

    • bos: BufferOutputStream

      the output stream to write to

    • value: boolean

      the boolean value to write

    Returns void

writeBranchMapping

  • Parameters

    Returns void

writeByte

  • Write a single signed byte

    Parameters

    • bos: ByteWriter

      the output stream to write to

    • value: number

      the byte value to write. Must be between 0 and 255

    Returns void

Const writeByteViaString

  • writeByteViaString(bos: ByteWriter, sb: string): void
  • Parameters

    Returns void

writeBytes

  • Write multiple bytes

    Parameters

    • bos: BufferOutputStream

      the output stream to write to

    • value: Uint8Array

      the bytes to be written

    Returns void

writeCollection

  • Write a collection of objects, using a specific writer function

    Type parameters

    • T

      the type of data in the collection

    Parameters

    Returns void

writeDictionary

  • Write a dictionary of strings and values

    Type parameters

    • T

      the type of data stored in the dictionary

    Parameters

    Returns void

writeInt32

  • Write an encoded Int32

    Parameters

    • bos: BufferOutputStream

      the output stream to write to

    • value: number

      the number to write as an int32

    Returns void

writeInt32BE

  • writeInt32BE(buffer: Uint8Array, offset: number, value: number): void
  • Writes a signed 32-bit integer to a Uint8Array.

    Parameters

    • buffer: Uint8Array

      The buffer to write to

    • offset: number

      The offset in the buffer to write to

    • value: number

      The value to write

    Returns void

writeInt64

  • Write an encoded Int64

    Writes a number as an Int64 to the given Output stream.

    Parameters

    • bos: BufferOutputStream

      the output stream to write to

    • value: number | Long

      the number to write

    Returns void

writeInt8

  • writeInt8(buffer: Uint8Array, offset: number, value: number): void
  • Writes an unsigned 8-bit integer to a Uint8Array.

    Parameters

    • buffer: Uint8Array

      The buffer to write to

    • offset: number

      The offset in the buffer to write to

    • value: number

      The value to write

    Returns void

writeLimit

  • Write a Limit to the stream

    Parameters

    Returns void

writeMap

writeObject

  • Write an object of keys/values

    Type parameters

    • T

      the type of data stored in the object

    • K: string | number

      the type of the object keys

    Parameters

    Returns void

writeOptional

  • writeOptional<T>(bos: BufferOutputStream, value: T | null | undefined, writer: (bos: BufferOutputStream, value: T) => void, predicate?: (value: T | null | undefined) => boolean): void
  • Write an optional value

    This will write a leading byte indicating whether the value is present (1) or not (0).

    Type parameters

    • T

    Parameters

    • bos: BufferOutputStream

      the output stream to write to

    • value: T | null | undefined

      the value to write

    • writer: (bos: BufferOutputStream, value: T) => void

      the writer function

    • Default value predicate: (value: T | null | undefined) => boolean = (value) => value !== null && value !== undefined
        • (value: T | null | undefined): boolean
        • Parameters

          • value: T | null | undefined

          Returns boolean

    Returns void

writePoint

  • Write a Point to the stream

    Parameters

    Returns void

writeRange

  • Write a FetchRange to the stream

    Parameters

    Returns void

writeString

  • Write a string using UTF-8 encoding

    Parameters

    Returns void

writeStringArrayMap

writeToBuffer

  • Serialise a message into a buffer

    Parameters

    Returns void

writeValue

  • writeValue<V>(valueToBytes: (value: V) => BytesImpl, event: Event<V>): Uint8Array
  • A converter function that converts an event to buffer data

    Type parameters

    • V

    Parameters

    • valueToBytes: (value: V) => BytesImpl

      a converter function that converts an underlying value to bytes data

    • event: Event<V>

      the event to convert

    Returns Uint8Array

    the buffer containing the event

xhrSubTransportFactoryProvider

  • Optionally provide environment specific XHR.

    Returns Subtransport

Object literals

Const ACQUIRE_SESSION_LOCK

ACQUIRE_SESSION_LOCK: object

id

id: number = 114

request

request: SessionLockRequestSerialiserClass = SessionLockRequestSerialiser

response

response: SessionLockAcquisitionSerialiserClass = SessionLockAcquisitionSerialiser

Const ADD_AND_SET_TOPIC

ADD_AND_SET_TOPIC: object

id

id: number = 122

request

request: AddAndSetTopicRequestSerialiserClass = AddAndSetTopicRequestSerialiser

response

response: AddTopicResultSerialiserClass = AddTopicResultSerialiser

Const APPLY_JSON_PATCH

APPLY_JSON_PATCH: object

id

id: number = 151

request

request: ApplyJsonPatchRequestSerialiserClass = ApplyJsonPatchRequestSerialiser

response

response: JsonPatchResultSerialiserClass = JsonPatchResultSerialiser

Const AUTHENTICATOR

AUTHENTICATOR: object

id

id: number = 120

request

request: AuthenticatorRequestSerialiserClass = AuthenticatorRequestSerialiser

response

response: AuthenticatorResponseSerialiserClass = AuthenticatorResponseSerialiser

Const AUTHENTICATOR_DEREGISTRATION

AUTHENTICATOR_DEREGISTRATION: object

id

id: number = 121

request

request: AuthenticatorRegistrationParametersSerialiserClass = AuthenticatorRegistrationParametersSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const AUTHENTICATOR_REGISTRATION

AUTHENTICATOR_REGISTRATION: object

id

id: number = 119

request

request: AuthenticatorRegistrationRequestSerialiserClass = AuthenticatorRegistrationRequestSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const CHANGE_AUTHORISATION_ROLES

CHANGE_AUTHORISATION_ROLES: object

id

id: number = 123

request

request: ChangeAuthorisationRolesRequestSerialiserClass = ChangeAuthorisationRolesRequestSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const CHANGE_AUTHORISATION_ROLES_FILTER

CHANGE_AUTHORISATION_ROLES_FILTER: object

id

id: number = 124

request

request: ChangeAuthorisationRolesFilterRequestSerialiserClass = ChangeAuthorisationRolesFilterRequestSerialiser

response

response: CountOrParserErrorsSerialiserClass = CountOrParserErrorsSerialiser

Const CHANGE_PRINCIPAL

CHANGE_PRINCIPAL: object

id

id: number = 5

request

request: ChangePrincipalRequestSerialiserClass = ChangePrincipalRequestSerialiser

response

response: BooleanSerialiserClass = BooleanSerialiser

Const CHECK_REMOTE_SERVER

CHECK_REMOTE_SERVER: object

id

id: number = 165

request

request: CheckRemoteServerRequestSerialiserClass = CheckRemoteServerRequestSerialiser

response

response: CheckRemoteServerResultSerialiserClass = CheckRemoteServerResultSerialiser

Const CHECK_UPDATE_STREAM

CHECK_UPDATE_STREAM: object

id

id: number = 127

request

request: UpdateStreamIdSerialiserClass = UpdateStreamIdSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const CLOSE_CLIENT

CLOSE_CLIENT: object

id

id: number = 14

request

request: CloseClientRequestSerialiserClass = CloseClientRequestSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const CLOSE_CLIENT_FILTER

CLOSE_CLIENT_FILTER: object

id

id: number = 162

request

request: StringSerialiserClass = StringSerialiser

response

response: CountOrParserErrorsSerialiserClass = CountOrParserErrorsSerialiser

Const CONNECTION_ACTION

CONNECTION_ACTION: object

An enum-like object containing all possible connection actions

ABSTAIN

ABSTAIN: object

id

id: number = 2

value

value: string = "abstain"

ALLOW

ALLOW: object

id

id: number = 0

value

value: string = "allow"

DENY

DENY: object

id

id: number = 1

value

value: string = "deny"

Const CREATE_REMOTE_SERVER

CREATE_REMOTE_SERVER: object

id

id: number = 157

request

request: RemoteServerDefinitionSerialiserClass = RemoteServerDefinitionSerialiser

response

response: CreateRemoteServerResultSerialiserClass = CreateRemoteServerResultSerialiser

Const CREATE_TOPIC_VIEW

CREATE_TOPIC_VIEW: object

id

id: number = 138

request

request: NamedTopicViewSpecificationSerialiserClass = NamedTopicViewSpecificationSerialiser

response

response: CreateTopicViewResultSerialiserClass = CreateTopicViewResultSerialiser

Const CREATE_UPDATE_STREAM

CREATE_UPDATE_STREAM: object

id

id: number = 125

request

request: CreateUpdateStreamRequestSerialiserClass = CreateUpdateStreamRequestSerialiser

response

response: CreateUpdateStreamResponseSerialiserClass = CreateUpdateStreamResponseSerialiser

Const CREATE_UPDATE_STREAM_AND_SET

CREATE_UPDATE_STREAM_AND_SET: object

id

id: number = 126

request

request: CreateUpdateStreamAndSetRequestSerialiserClass = CreateUpdateStreamAndSetRequestSerialiser

response

response: CreateUpdateStreamResponseSerialiserClass = CreateUpdateStreamResponseSerialiser

Const ClientControlOptions

ClientControlOptions: object

ANONYMOUS

ANONYMOUS: string = ""

Value returned by Session.getPrincipal if no principal name is associated with the session.

CloseReason

CloseReason: {} = CloseReasonEnum

Type declaration

PropertyKeys

PropertyKeys: Readonly<{ ALL_FIXED_PROPERTIES: string[]; ALL_PROPERTIES: string[]; ALL_USER_PROPERTIES: string[]; CLIENT_IP: string; CLIENT_TYPE: string; CONNECTOR: string; COUNTRY: string; ENVIRONMENT: string; EXPIRY_TIME: string; GATEWAY_ID: string; GATEWAY_TYPE: string; LANGUAGE: string; LATITUDE: string; LONGITUDE: string; MQTT_CLIENT_ID: string; PRINCIPAL: string; ROLES: string; SERVER_NAME: string; SESSION_ID: string; START_TIME: string; TRANSPORT: string }> = Object.freeze({/*** This constant can be used instead of a property key in requests for* session property values to indicate that <b>all</b> fixed session* properties are required.*/ALL_FIXED_PROPERTIES: ['*F'],/*** This constant can be used instead of a property key in requests for* session property values to indicate that <b>all</b> user defined session* properties are required.*/ALL_USER_PROPERTIES: ['*U'],/*** This constant can be used instead of a property key in requests for* session property values to indicate that <b>all</b> session* properties are required.*/ALL_PROPERTIES: ['*F', '*U'],/*** Session property key for session identifier.** @since 6.2*/SESSION_ID: '$SessionId',/*** Session property key for principal.** @since 6.2*/PRINCIPAL: '$Principal',/*** Session property key for connector name.** @since 6.2*/CONNECTOR: '$Connector',/*** Session property key for transport.** @since 6.2*/TRANSPORT: '$Transport',/*** Session property key for client type.** @since 6.2*/CLIENT_TYPE: '$ClientType',/*** Session property key for country code.** @since 6.2*/COUNTRY: '$Country',/*** Session property key for language code.** @since 6.2*/LANGUAGE: '$Language',/*** Session property key for server name.** @since 6.2*/SERVER_NAME: '$ServerName',/*** Session property key for client IP address.** @since 6.2*/CLIENT_IP: '$ClientIP',/*** Session property key for client latitude.** @since 6.2*/LATITUDE: '$Latitude',/*** Session property key for client longitude.** @since 6.2*/LONGITUDE: '$Longitude',/*** Session property key for client start time.** @since 6.2*/START_TIME: '$StartTime',/*** Session property key for client session expiry time.** @since 6.12*/EXPIRY_TIME: '$ExpiryTime',/*** Session property key for session roles.** @since 6.2*/ROLES: '$Roles',/*** Session property key for MQTT client ID.** @since 6.6*/MQTT_CLIENT_ID: '$MQTTClientId',/*** Session property key for Gateway Client type.** @since 6.6*/GATEWAY_TYPE: '$GatewayType',/*** Session property key for Gateway Client identifier.** @since 6.6*/GATEWAY_ID: '$GatewayId',/*** Session property key for client environment.** @since 6.11*/ENVIRONMENT: '$Environment'})

Dictionary containing standard session property keys

Example:

// Get the ALL_FIXED_PROPERTIES key
var props = diffusion.clients.PropertyKeys.ALL_FIXED_PROPERTIES;

Example:

// Get all user and fixed properties
var props = diffusion.clients.PropertyKeys.ALL_FIXED_PROPERTIES
     .concat(diffusion.clients.PropertyKeys.ALL_USER_PROPERTIES);

SessionEventStreamEventType

SessionEventStreamEventType: SessionEventStreamEventType = SessionEventStreamEventType

SessionState

SessionState: SessionState = SessionState

Const CloseReasonEnum

CloseReasonEnum: object

Enum representing the reason that the session has been closed.

Example:

diffusion.connect({...}).then(function(session) {...}, function(err) {
  switch(err) {
      case diffusion.clients.CloseReason.CLOSED_BY_CLIENT:
      // Do something
      case diffusion.clients.CloseReason.ACCESS_DENIED:
      // Do something else
      ...
  }
});

ACCESS_DENIED

ACCESS_DENIED: CloseReasonImpl = new CloseReasonImpl(99, 'The connection attempt was rejected by the server because authentication failed', false)

The connection attempt failed due to a security restraint or due to invalid credentials.

CLOSED_BY_CLIENT

CLOSED_BY_CLIENT: CloseReasonImpl = new CloseReasonImpl(0, 'The session was closed by the client', false)

The client requested close. Not recoverable.

CLOSED_BY_SERVER

CLOSED_BY_SERVER: CloseReasonImpl = new CloseReasonImpl(1, 'The session was closed by the server', false)

The session has been closed by the server, or another session using the ClientControl feature.

CONNECTION_ERROR

CONNECTION_ERROR: CloseReasonImpl = new CloseReasonImpl(7, 'The client could not establish a connection to the server', true)

The client could not establish a connection to the server.

An error was thrown while the client was attempting to connect to the server.

CONNECTION_TIMEOUT

CONNECTION_TIMEOUT: CloseReasonImpl = new CloseReasonImpl(3, 'The connection attempt timed out', false)

The connection attempt timed out, waiting for a response from the server.

The reconnection timeout can be controlled by the reconnect options.

HANDSHAKE_ERROR

HANDSHAKE_ERROR: CloseReasonImpl = new CloseReasonImpl(5, 'There was an error parsing the handshake response', false)

There was an error parsing the handshake response.

The client received a handshake response from the server but the response was malformed and could not be deserialised.

HANDSHAKE_REJECTED

HANDSHAKE_REJECTED: CloseReasonImpl = new CloseReasonImpl(4, 'The connection handshake was rejected by the server', false)

The connection handshake was rejected by the server.

The server responded with an unknown error code when the client attempted to connect.

IDLE_CONNECTION

IDLE_CONNECTION: CloseReasonImpl = new CloseReasonImpl(8, 'The activity monitor detected the connection was idle', true)

The client detected that the connection was idle.

The client has not received a ping message from the server for an extended period of time.

LICENSE_EXCEEDED

LICENSE_EXCEEDED: CloseReasonImpl = new CloseReasonImpl(18, 'The license limit was exceeded', false)

The connection request was rejected because the license limit was reached.

LOST_MESSAGES

LOST_MESSAGES: CloseReasonImpl = new CloseReasonImpl(16, 'Loss of messages has been detected', false)

Loss of messages from the client has been detected. For example, whilst waiting for the arrival of missing messages in a sequence of messages a timeout has occurred.

HTTP based transports use multiple TCP connections. This can cause the messages to be received out of order. To reorder the messages those sent to the server may contain a sequence number indicating the correct order.

If a message is received out of order there is a short time for the earlier messages to be received. If the messages are not received in this time the client is closed.

Missing, invalid or duplicate sequence numbers will also close the client for this reason.

This cannot be recovered from as the client and the server are in inconsistent states.

PROTOCOL_VERSION_MISMATCH

PROTOCOL_VERSION_MISMATCH: CloseReasonImpl = new CloseReasonImpl(17,'Client version rejected : Client should be downgraded to use server compatible version ' +'or server upgraded to client version in use',false)

The handshake response contained an incompatible protocol version.

The server does not support the client's protocol version.

The client version is later than the server version

RECONNECT_ABORTED

RECONNECT_ABORTED: CloseReasonImpl = new CloseReasonImpl(2, 'Client aborted a reconnect attempt', false)

Whilst disconnected, the client explicitly aborted a reconnect attempt.

REDIRECT_REJECTED

REDIRECT_REJECTED: CloseReasonImpl = new CloseReasonImpl(19, 'An HTTP redirect of the connection was rejected', false)

An HTTP redirect of the WebSocket connection was rejected.

The redirect status is not followed, the redirect has no valid location, it would redirect a secure connection to an insecure one, the redirect limit was exceeded, or it would connect to a URL already visited. The client logs which redirect was rejected and why.

since

6.14

TRANSPORT_ERROR

TRANSPORT_ERROR: CloseReasonImpl = new CloseReasonImpl(6, 'There was an unexpected error with the connection', true)

There was an unexpected error with the network connection.

The underlying transport (Websocket, XHR) received an error that could not be handled.

Const DEFAULT_RETRY_STRATEGY

DEFAULT_RETRY_STRATEGY: object

Default initial connection retry strategy

attempts

attempts: number = 0

interval

interval: number = 0

Const EncodingType

EncodingType: object

NO_ENCODING

NO_ENCODING: MessageEncoding = new MessageEncoding(0x00, 0x00)

ZLIB

ZLIB: MessageEncoding = new MessageEncoding(0x12, 0x01)

Const ErrorReason

ErrorReason: object

Defined reason code and message used to report error conditions. Enum containing reason codes used to report error conditions.

Some common ErrorReason values are defined as global constants. More specific reasons may be defined by individual features.

Example:

// Handle an error from the server
session.addStream('foo', diffusion.datatypes.string()).on('error', function(e) {
    if (e == diffusion.errors.ACCESS_DENIED) {
        // Handle authorisation error
    } else {
        // Log the problem
        console.log(e);
    }
});

constructor

  • new ErrorReason(id: number, reason: string): ErrorReason
  • Create an error reason

    Parameters

    • id: number

      the error reason's id

    • reason: string

      the error reason's description

    Returns ErrorReason

id

id: number

The error reason's id

reason

reason: string

The error reason's description

ACCESS_DENIED

ACCESS_DENIED: ErrorReason = new ErrorReasonImpl(103, 'Access denied')

The request was rejected because the caller has insufficient permissions.

CALLBACK_EXCEPTION

CALLBACK_EXCEPTION: ErrorReason = new ErrorReasonImpl(105, 'An application callback threw an exception. Check logs for more information')

An application callback threw an exception. Check logs for more information.

CLUSTER_REPARTITION

CLUSTER_REPARTITION: ErrorReason = new ErrorReasonImpl(110, 'The cluster was repartitioning and the request could not be routed.')

A cluster operation failed because partition ownership changed during processing.

This is a transient error that occurs while the cluster is recovering from failure. The session can retry the operation.

CLUSTER_ROUTING

CLUSTER_ROUTING: ErrorReason = new ErrorReasonImpl(112, 'The cluster operation could not be routed.')

A cluster operation failed to be routed to a server within the cluster due to a communication failure, or the server that owns a partition is not currently known.

This is a transient error that occurs while the cluster is recovering from failure. The session can retry the operation.

COMMUNICATION_FAILURE

COMMUNICATION_FAILURE: ErrorReason = new ErrorReasonImpl(100, 'Communication with server failed')

Communication with the server failed.

HANDLER_CONFLICT

HANDLER_CONFLICT: ErrorReason = new ErrorReasonImpl(201, 'Conflict with an existing handler')

A conflicting registration exists on the server.

INCOMPATIBLE_DATATYPE

INCOMPATIBLE_DATATYPE: ErrorReason = new ErrorReasonImpl(108, 'Data type is incompatible')

An operation failed due to using an incompatible data type.

INCOMPATIBLE_STATE

INCOMPATIBLE_STATE: ErrorReason = new ErrorReasonImpl(111,'Topic operation not performed because it is managed by a component that prohibits external updates')

A topic update could not be performed because the topic is managed by a component (for example,fan-out) which prohibits external updates.

INVALID_DATA

INVALID_DATA: ErrorReason = new ErrorReasonImpl(106, 'Invalid data')

An operation failed because invalid data was received.

INVALID_PATH

INVALID_PATH: ErrorReason = new ErrorReasonImpl(202, 'Invalid path')

An invalid path was supplied.

NO_SUCH_SESSION

NO_SUCH_SESSION: ErrorReason = new ErrorReasonImpl(107, 'A requested session could not be found')

An operation failed because an addressed session could not be found.

REJECTED_REQUEST

REJECTED_REQUEST: ErrorReason = new ErrorReasonImpl(9003, 'A request has been rejected by the recipient session')

A recipient session has rejected a received message request.

REQUEST_TIME_OUT

REQUEST_TIME_OUT: ErrorReason = new ErrorReasonImpl(102, 'Request time out')

Communication with the server failed because a service request timed out.

SESSION_CLOSED

SESSION_CLOSED: ErrorReason = new ErrorReasonImpl(101, 'Session is closed')

Communication with the server failed because the session is closed.

TOPIC_TREE_REGISTRATION_CONFLICT

TOPIC_TREE_REGISTRATION_CONFLICT: ErrorReason = new ErrorReasonImpl(200, 'A conflicting registration exists on the same branch of the topic tree')

A conflicting registration exists on the same branch of the topic tree.

UNHANDLED_MESSAGE

UNHANDLED_MESSAGE: ErrorReason = new ErrorReasonImpl(109, 'A message was not handled')

A sent message was not handled by the specified recipient.

UNSUPPORTED

UNSUPPORTED: ErrorReason = new ErrorReasonImpl(104, 'Unsupported service')

The request was rejected because the requested operation is unsupported for this caller.

toString

  • toString(): string
  • Convert the error reson to a string

    Returns string

    a string representation of the error reason

Const FETCH_LOG_ENTRIES_SERVICE

FETCH_LOG_ENTRIES_SERVICE: object

id

id: number = 132

request

request: EntriesFetchRequestSerialiserClass = EntriesFetchRequestSerialiser

response

response: EntriesFetchResponseSerialiserClass = EntriesFetchResponseSerialiser

Const FETCH_QUERY

FETCH_QUERY: object

id

id: number = 117

request

request: FetchQuerySerialiserClass = FetchQuerySerialiser

response

response: FetchQueryResultSerialiserClass = FetchQueryResultSerialiser

Const FILTER_RESPONSE

FILTER_RESPONSE: object

id

id: number = 103

request

request: MessagingFilterResponseSerialiserClass = MessagingFilterResponseSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const FILTER_SUBSCRIBE

FILTER_SUBSCRIBE: object

id

id: number = 65

request

request: ClientFilterSubscribeRequestSerialiserClass = ClientFilterSubscribeRequestSerialiser

response

response: ClientFilterSubscribeResponseSerialiserClass = ClientFilterSubscribeResponseSerialiser

Const FILTER_UNSUBSCRIBE

FILTER_UNSUBSCRIBE: object

id

id: number = 66

request

request: ClientFilterSubscribeRequestSerialiserClass = ClientFilterSubscribeRequestSerialiser

response

response: ClientFilterSubscribeResponseSerialiserClass = ClientFilterSubscribeResponseSerialiser

Const GATEWAY_CLIENT_REQUEST

GATEWAY_CLIENT_REQUEST: object

id

id: number = 170

request

request: GatewayClientRequestSerialiserClass = GatewayClientRequestSerialiser

response

response: GatewayResponseSerialiserClass = GatewayResponseSerialiser

Const GET_BRANCH_MAPPING_TABLE

GET_BRANCH_MAPPING_TABLE: object

id

id: number = 178

request

request: StringSerialiserClass = StringSerialiser

response

response: BranchMappingTableSerialiserClass = BranchMappingTableSerialiser

Const GET_GATEWAY_CLIENTS

GET_GATEWAY_CLIENTS: object

id

id: number = 175

request

request: AbstractSerialiser<null> = NullSerialiser

response

response: GatewayClientListSerialiserClass = GatewayClientListSerialiser

Const GET_GATEWAY_CLIENT_DETAILS

GET_GATEWAY_CLIENT_DETAILS: object

id

id: number = 185

request

request: GatewayClientDetailListRequestSerialiserClass = GatewayClientDetailListRequestSerialiser

response

response: GatewayClientDetailListSerialiserClass = GatewayClientDetailListSerialiser

Const GET_MEASURED_ENTITY_CLASS_METRICS

GET_MEASURED_ENTITY_CLASS_METRICS: object

id

id: number = 145

request

request: MeasuredEntityClassRequestSerialiserClass = MeasuredEntityClassRequestSerialiser

response

response: MeasuredEntityClassMetricsSerialiserClass = MeasuredEntityClassMetricsSerialiser

Const GET_METRICS

GET_METRICS: object

id

id: number = 186

request

request: MetricsRequestSerialiserClass = MetricsRequestSerialiser

response

response: MetricsResultSerialiserClass = MetricsResultSerialiser

Const GET_OWN_SESSION_PROPERTIES

GET_OWN_SESSION_PROPERTIES: object

id

id: number = 202

request

request: AbstractSerialiser<null> = NullSerialiser

response

response: GetSessionPropertiesResponseSerialiserClass = GetSessionPropertiesResponseSerialiser

Const GET_SECURITY_CONFIGURATION

GET_SECURITY_CONFIGURATION: object

id

id: number = 59

request

request: AbstractSerialiser<null> = NullSerialiser

response

response: SecurityConfigurationSerialiserClass = SecurityConfigurationSerialiser

Const GET_SELECTORS

GET_SELECTORS: object

id

id: number = 198

request

request: SessionIdSerialiserClass = SessionIdSerialiser

response

response: GetSelectorsResultSerialiserClass = GetSelectorsResultSerialiser

Const GET_SERVER_METRICS

GET_SERVER_METRICS: object

id

id: number = 142

request

request: AbstractSerialiser<null> = NullSerialiser

response

response: ServerMetricsSerialiserClass = ServerMetricsSerialiser

Const GET_SESSION_LOCK

GET_SESSION_LOCK: object

id

id: number = 196

request

request: StringSerialiserClass = StringSerialiser

response

response: GetSessionLockResultSerialiserClass = GetSessionLockResultSerialiser

Const GET_SESSION_LOCKS

GET_SESSION_LOCKS: object

id

id: number = 197

request

request: AbstractSerialiser<null> = NullSerialiser

response

response: GetSessionLocksResultSerialiserClass = GetSessionLocksResultSerialiser

Const GET_SESSION_PROPERTIES

GET_SESSION_PROPERTIES: object

id

id: number = 67

request

request: GetSessionPropertiesRequestSerialiserClass = GetSessionPropertiesRequestSerialiser

response

response: GetSessionPropertiesResponseSerialiserClass = GetSessionPropertiesResponseSerialiser

Const GET_SESSION_TREE_BRANCHES_WITH_MAPPINGS

GET_SESSION_TREE_BRANCHES_WITH_MAPPINGS: object

id

id: number = 177

request

request: AbstractSerialiser<null> = NullSerialiser

response

response: SessionTreeBranchListSerialiserClass = SessionTreeBranchListSerialiser

Const GET_SYSTEM_AUTHENTICATION

GET_SYSTEM_AUTHENTICATION: object

id

id: number = 57

request

request: AbstractSerialiser<null> = NullSerialiser

response

response: SystemAuthenticationConfigurationSerialiserClass = SystemAuthenticationConfigurationSerialiser

Const GET_TOPIC_VIEW

GET_TOPIC_VIEW: object

id

id: number = 182

request

request: StringSerialiserClass = StringSerialiser

response

response: GetTopicViewResultSerialiserClass = GetTopicViewResultSerialiser

Const LIST_GLOBAL_PERMISSIONS

LIST_GLOBAL_PERMISSIONS: object

id

id: number = 143

request

request: AbstractSerialiser<null> = NullSerialiser

response

response: ListGlobalPermissionsResultSerialiserClass = ListGlobalPermissionsResultSerialiser

Const LIST_METRIC_ALERTS

LIST_METRIC_ALERTS: object

id

id: number = 188

request

request: AbstractSerialiser<null> = NullSerialiser

response

response: ListMetricAlertsResultSerialiserClass = ListMetricAlertsResultSerialiser

Const LIST_PATH_PERMISSIONS

LIST_PATH_PERMISSIONS: object

id

id: number = 144

request

request: StringSerialiserClass = StringSerialiser

response

response: ListPathPermissionsResultSerialiserClass = ListPathPermissionsResultSerialiser

Const LIST_REMOTE_SERVERS

LIST_REMOTE_SERVERS: object

id

id: number = 164

request

request: AbstractSerialiser<null> = NullSerialiser

response

response: ListRemoteServersResultSerialiserClass = ListRemoteServersResultSerialiser

Const LIST_SESSION_METRIC_COLLECTORS

LIST_SESSION_METRIC_COLLECTORS: object

id

id: number = 137

request

request: AbstractSerialiser<null> = NullSerialiser

response

response: SessionMetricCollectorListSerialiserClass = SessionMetricCollectorListSerialiser

Const LIST_TOPIC_METRIC_COLLECTORS

LIST_TOPIC_METRIC_COLLECTORS: object

id

id: number = 148

request

request: AbstractSerialiser<null> = NullSerialiser

response

response: TopicMetricCollectorListSerialiserClass = TopicMetricCollectorListSerialiser

Const LIST_TOPIC_VIEWS

LIST_TOPIC_VIEWS: object

id

id: number = 141

request

request: AbstractSerialiser<null> = NullSerialiser

response

response: ListTopicViewsResultSerialiserClass = ListTopicViewsResultSerialiser

Const MESSAGE_RECEIVER_CONTROL_DEREGISTRATION

MESSAGE_RECEIVER_CONTROL_DEREGISTRATION: object

id

id: number = 64

request

request: MessageReceiverControlRegistrationParamsSerialiserClass = MessageReceiverControlRegistrationParamsSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const MESSAGE_RECEIVER_CONTROL_REGISTRATION

MESSAGE_RECEIVER_CONTROL_REGISTRATION: object

id

id: number = 63

request

request: MessageReceiverControlRegistrationRequestSerialiserClass = MessageReceiverControlRegistrationRequestSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const MESSAGING_FILTER_SEND

MESSAGING_FILTER_SEND: object

id

id: number = 102

request

request: MessagingFilterSendRequestSerialiserClass = MessagingFilterSendRequestSerialiser

response

response: MessagingFilterSendResponseSerialiserClass = MessagingFilterSendResponseSerialiser

Const MESSAGING_RECEIVER_CLIENT

MESSAGING_RECEIVER_CLIENT: object

id

id: number = 88

request

request: MessagingClientForwardSendRequestSerialiserClass = MessagingClientForwardSendRequestSerialiser

response

response: MessagingResponseSerialiserClass = MessagingResponseSerialiser

Const MESSAGING_RECEIVER_CONTROL_DEREGISTRATION

MESSAGING_RECEIVER_CONTROL_DEREGISTRATION: object

id

id: number = 98

request

request: MessageReceiverControlRegistrationParamsSerialiserClass = MessageReceiverControlRegistrationParamsSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const MESSAGING_RECEIVER_CONTROL_REGISTRATION

MESSAGING_RECEIVER_CONTROL_REGISTRATION: object

id

id: number = 97

request

request: MessageReceiverControlRegistrationRequestSerialiserClass = MessageReceiverControlRegistrationRequestSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const MESSAGING_RECEIVER_SERVER

MESSAGING_RECEIVER_SERVER: object

id

id: number = 86

request

request: MessagingClientSendRequestSerialiserClass = MessagingClientSendRequestSerialiser

response

response: MessagingResponseSerialiserClass = MessagingResponseSerialiser

Const MESSAGING_SEND

MESSAGING_SEND: object

id

id: number = 85

request

request: MessagingSendRequestSerialiserClass = MessagingSendRequestSerialiser

response

response: MessagingResponseSerialiserClass = MessagingResponseSerialiser

Const MISSING_TOPIC

MISSING_TOPIC: object

id

id: number = 50

request

request: MissingTopicRequestSerialiserClass = MissingTopicRequestSerialiser

response

response: BooleanSerialiserClass = BooleanSerialiser

Const NOTIFY_SUBSCRIPTION

NOTIFY_SUBSCRIPTION: object

id

id: number = 87

request

request: TopicSpecificationInfoSerialiserClass = TopicSpecificationInfoSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const NO_TOPIC_SIZE_INFO

NO_TOPIC_SIZE_INFO: object

FetchTopicSizeInfo implementation for cases where size is not requested or the topic has no value.

infoType

infoType: NO_SIZE_INFO = FetchTopicSizeType.NO_SIZE_INFO

valueCount

valueCount: number = 0

valueSize

valueSize: number = 0

valueTotalSize

valueTotalSize: Long = new Long(0)

Const NULL_CALLBACK

NULL_CALLBACK: object

A service callback that does nothing

fail

  • fail(): void
  • Returns void

respond

  • respond(): void
  • Returns void

Const NullSerialiser

NullSerialiser: object

read

  • read(): null
  • Returns null

write

  • write(): void
  • Returns void

Const PROTOCOL

PROTOCOL: object

Protocol constants

CAPABILITIES

CAPABILITIES: number = isZlibBundleLoaded() ? 10 : /* istanbul ignore next */ 8

A code indicating the clients capabilities

CURRENT_VERSION

CURRENT_VERSION: number = 31

The client's protocol version

PROTOCOL_BYTE

PROTOCOL_BYTE: number = 35

A byte inticating the diffusion protocol

TYPE

TYPE: string = "WB"

The protocol type

Const PUT_BRANCH_MAPPING_TABLE

PUT_BRANCH_MAPPING_TABLE: object

id

id: number = 176

request

request: BranchMappingTableSerialiserClass = BranchMappingTableSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const PUT_SESSION_METRIC_COLLECTOR

PUT_SESSION_METRIC_COLLECTOR: object

id

id: number = 135

request

request: SessionMetricCollectorSerialiserClass = SessionMetricCollectorSerialiser

response

response: ErrorReportListSerialiserClass = ErrorReportListSerialiser

Const PUT_TOPIC_METRIC_COLLECTOR

PUT_TOPIC_METRIC_COLLECTOR: object

id

id: number = 146

request

request: TopicMetricCollectorSerialiserClass = TopicMetricCollectorSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const QueryTypes

QueryTypes: object

Enum-like object for timeseries query types

ALL_EDITS

ALL_EDITS: QueryType = new QueryType(1, StreamStructures.EDIT_EVENT_STREAM)

A query type for all edits

LATEST_EDITS

LATEST_EDITS: QueryType = new QueryType(2, StreamStructures.EDIT_EVENT_STREAM)

A query type for the latest edits

VALUES

VALUES: QueryType = new QueryType(0, StreamStructures.VALUE_EVENT_STREAM)

A values query type

Const REGISTER_GATEWAY_CLIENT

REGISTER_GATEWAY_CLIENT: object

id

id: number = 173

request

request: GatewayClientKeySerialiserClass = GatewayClientKeySerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const RELEASE_SESSION_LOCK

RELEASE_SESSION_LOCK: object

id

id: number = 116

request

request: SessionLockAcquisitionSerialiserClass = SessionLockAcquisitionSerialiser

response

response: BooleanSerialiserClass = BooleanSerialiser

Const REMOVE_GATEWAY_CLIENT

REMOVE_GATEWAY_CLIENT: object

id

id: number = 174

request

request: GatewayClientKeySerialiserClass = GatewayClientKeySerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const REMOVE_METRIC_ALERT

REMOVE_METRIC_ALERT: object

id

id: number = 191

request

request: StringSerialiserClass = StringSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const REMOVE_REMOTE_SERVER

REMOVE_REMOTE_SERVER: object

id

id: number = 158

request

request: StringSerialiserClass = StringSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const REMOVE_SESSION_METRIC_COLLECTOR

REMOVE_SESSION_METRIC_COLLECTOR: object

id

id: number = 136

request

request: StringSerialiserClass = StringSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const REMOVE_TOPIC_METRIC_COLLECTOR

REMOVE_TOPIC_METRIC_COLLECTOR: object

id

id: number = 147

request

request: StringSerialiserClass = StringSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const REMOVE_TOPIC_VIEW

REMOVE_TOPIC_VIEW: object

id

id: number = 139

request

request: StringSerialiserClass = StringSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const REVOKE_AUTHENTICATION

REVOKE_AUTHENTICATION: object

id

id: number = 204

request

request: SessionIdSerialiserClass = SessionIdSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const RE_AUTHENTICATE

RE_AUTHENTICATE: object

id

id: number = 203

request

request: ReauthenticateRequestSerialiserClass = ReauthenticateRequestSerialiser

response

response: BooleanSerialiserClass = BooleanSerialiser

Const SESSION_EVENT_DEREGISTRATION

SESSION_EVENT_DEREGISTRATION: object

id

id: number = 190

request

request: CIDSerialiserClass = CIDSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const SESSION_EVENT_REGISTRATION

SESSION_EVENT_REGISTRATION: object

id

id: number = 189

request

request: SessionEventListenerRegistrationRequestSerialiserClass = SessionEventListenerRegistrationRequestSerialiser

response

response: ErrorReportListSerialiserClass = ErrorReportListSerialiser

Const SESSION_FETCH

SESSION_FETCH: object

id

id: number = 168

request

request: SessionFetchQuerySerialiserClass = SessionFetchQuerySerialiser

response

response: SessionFetchQueryResultSerialiserClass = SessionFetchQueryResultSerialiser

Const SESSION_PROPERTIES_EVENT_2

SESSION_PROPERTIES_EVENT_2: object

id

id: number = 82

request

request: SessionPropertiesEventBatchSerialiserClass = SessionPropertiesEventBatchSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const SESSION_PROPERTIES_REGISTRATION_2

SESSION_PROPERTIES_REGISTRATION_2: object

id

id: number = 81

request

request: SetSessionPropertiesListenerSerialiserClass = SetSessionPropertiesListenerSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const SET_CLIENT_CONFLATION

SET_CLIENT_CONFLATION: object

id

id: number = 15

request

request: SetClientConflationRequestSerialiserClass = SetClientConflationRequestSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const SET_CLIENT_CONFLATION_FILTER

SET_CLIENT_CONFLATION_FILTER: object

id

id: number = 163

request

request: SetClientConflationFilterRequestSerialiserClass = SetClientConflationFilterRequestSerialiser

response

response: CountOrParserErrorsSerialiserClass = CountOrParserErrorsSerialiser

Const SET_METRIC_ALERT

SET_METRIC_ALERT: object

id

id: number = 187

request

request: SetMetricAlertRequestSerialiserClass = SetMetricAlertRequestSerialiser

response

response: ErrorReportListSerialiserClass = ErrorReportListSerialiser

Const SET_SESSION_PROPERTIES

SET_SESSION_PROPERTIES: object

id

id: number = 105

request

request: SetSessionPropertiesRequestSerialiserClass = SetSessionPropertiesRequestSerialiser

response

response: SetSessionPropertiesResultSerialiserClass = SetSessionPropertiesResultSerialiser

Const SET_SESSION_PROPERTIES_FILTER

SET_SESSION_PROPERTIES_FILTER: object

id

id: number = 106

request

request: SetSessionPropertiesFilterRequestSerialiserClass = SetSessionPropertiesFilterRequestSerialiser

response

response: CountOrParserErrorsSerialiserClass = CountOrParserErrorsSerialiser

Const SET_TOPIC

SET_TOPIC: object

id

id: number = 118

request

request: SetTopicRequestSerialiserClass = SetTopicRequestSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const STREAM_ADD_AND_SET_TOPIC_SERVICE

STREAM_ADD_AND_SET_TOPIC_SERVICE: object

id

id: number = 131

request

request: AddAndSetTopicRequestSerialiserClass = AddAndSetTopicRequestSerialiser

response

response: UpdateStreamAddTopicResponseSerialiserClass = UpdateStreamAddTopicResponseSerialiser

Const STREAM_ADD_TOPIC_SERVICE

STREAM_ADD_TOPIC_SERVICE: object

id

id: number = 130

request

request: UpdateStreamAddTopicRequestSerialiserClass = UpdateStreamAddTopicRequestSerialiser

response

response: UpdateStreamAddTopicResponseSerialiserClass = UpdateStreamAddTopicResponseSerialiser

Const STREAM_APPLY_DELTA_SERVICE

STREAM_APPLY_DELTA_SERVICE: object

id

id: number = 129

request

request: UpdateStreamRequestSerialiserClass = UpdateStreamRequestSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const STREAM_SET_TOPIC_SERVICE

STREAM_SET_TOPIC_SERVICE: object

id

id: number = 128

request

request: UpdateStreamRequestSerialiserClass = UpdateStreamRequestSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const SUBSCRIBE

SUBSCRIBE: object

id

id: number = 3

request

request: TopicSelectionRequestSerialiserClass = TopicSelectionRequestSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const SUBSCRIBE_CLIENT

SUBSCRIBE_CLIENT: object

id

id: number = 10

request

request: ClientSubscribeRequestSerialiserClass = ClientSubscribeRequestSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const SYSTEM_PING

SYSTEM_PING: object

id

id: number = 55

request

request: AbstractSerialiser<null> = NullSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const SessionLockOptions

SessionLockOptions: object

SessionLockScope

SessionLockScope: SessionLockScope = SessionLockScope

Const StreamStructures

StreamStructures: object

Enum-like object for timeseries stream structures

EDIT_EVENT_STREAM

EDIT_EVENT_STREAM: StreamStructure = new StreamStructure(2, 'EDIT_EVENT_STREAM')

An edit event stream

VALUE_EVENT_STREAM

VALUE_EVENT_STREAM: StreamStructure = new StreamStructure(1, 'VALUE_EVENT_STREAM')

A value event stream

Const TIME_SERIES_APPEND

TIME_SERIES_APPEND: object

id

id: number = 99

request

request: TimeSeriesAppendRequestSerialiserClass = TimeSeriesAppendRequestSerialiser

response

response: EventMetadataImplSerialiserClass = TimeSeriesEventMetadataSerialiser

Const TIME_SERIES_EDIT

TIME_SERIES_EDIT: object

id

id: number = 100

request

request: TimeSeriesEditRequestSerialiserClass = TimeSeriesEditRequestSerialiser

response

response: EventMetadataImplSerialiserClass = TimeSeriesEventMetadataSerialiser

Const TIME_SERIES_TIMESTAMP_APPEND

TIME_SERIES_TIMESTAMP_APPEND: object

id

id: number = 166

request

request: TimeSeriesTimestampAppendRequestSerialiserClass = TimeSeriesTimestampAppendRequestSerialiser

response

response: EventMetadataImplSerialiserClass = TimeSeriesEventMetadataSerialiser

Const TOPIC_ADD

TOPIC_ADD: object

id

id: number = 112

request

request: TopicAddRequestSerialiserClass = TopicAddRequestSerialiser

response

response: TopicAddResponseSerialiserClass = TopicAddResponseSerialiser

Const TOPIC_CONTROL_DEREGISTRATION

TOPIC_CONTROL_DEREGISTRATION: object

id

id: number = 21

request

request: TopicControlRegistrationParamsSerialiserClass = TopicControlRegistrationParamsSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const TOPIC_CONTROL_REGISTRATION

TOPIC_CONTROL_REGISTRATION: object

id

id: number = 20

request

request: TopicControlRegistrationRequestSerialiserClass = TopicControlRegistrationRequestSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const TOPIC_DESCENDANT_EVENTS

TOPIC_DESCENDANT_EVENTS: object

id

id: number = 93

request

request: TopicNotificationDescendantEventSerialiserClass = TopicNotificationDescendantEventSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const TOPIC_NOTIFICATION_DEREGISTRATION

TOPIC_NOTIFICATION_DEREGISTRATION: object

id

id: number = 91

request

request: TopicNotificationDeregistrationRequestSerialiserClass = TopicNotificationDeregistrationRequestSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const TOPIC_NOTIFICATION_DESELECTION

TOPIC_NOTIFICATION_DESELECTION: object

id

id: number = 95

request

request: TopicNotificationDeselectionSerialiserClass = TopicNotificationDeselectionSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const TOPIC_NOTIFICATION_EVENTS

TOPIC_NOTIFICATION_EVENTS: object

id

id: number = 92

request

request: TopicNotificationEventSerialiserClass = TopicNotificationEventSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const TOPIC_NOTIFICATION_SELECTION

TOPIC_NOTIFICATION_SELECTION: object

id

id: number = 94

request

request: TopicNotificationSelectionSerialiserClass = TopicNotificationSelectionSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const TOPIC_REMOVAL

TOPIC_REMOVAL: object

id

id: number = 83

request

request: RemoveTopicSerialiserClass = RemoveTopicSerialiser

response

response: IntegerSerialiserClass = IntegerSerialiser

Const TopicAddFailReasonEnum

TopicAddFailReasonEnum: object

The reason that a topic could not be added.

Example:

session.topics.add('foo').then(function() { ... }, function(err) {
    switch (err) {
         case diffusion.topics.TopicAddFailReason.EXISTS:
             ...
         case diffusion.topics.TopicAddFailReason.INVALID_NAME:
             ...
    }
});

CLUSTER_REPARTITION

CLUSTER_REPARTITION: TopicAddFailReason = new TopicAddFailReason(10, 'When trying to create the topic the cluster was migrating the partition that owns the topic')

When trying to create the topic the cluster was migrating the partition that owns the topic. The correct owner could not be identified and the request failed. This is a transient failure for the duration of the partition migration.

EXCEEDED_LICENSE_LIMIT

EXCEEDED_LICENSE_LIMIT: TopicAddFailReason = new TopicAddFailReason(11, 'Adding the topic failed because of a license limit')

Adding the topic failed because of a license limit.

EXISTS

EXISTS: TopicAddFailReason = new TopicAddFailReason(1, 'The topic already exists with the same details')

The topic already exists with the same details.

EXISTS_INCOMPATIBLE

EXISTS_INCOMPATIBLE: TopicAddFailReason = new TopicAddFailReason(14, 'Adding the topic failed because a topic is already bound to the specified' +'path but the caller does not have the rights to manage it')

Adding the topic failed because a topic is already bound to the specified path but the caller does not have the rights to manage it.

This can be because the topic is being managed by a component with exclusive control over the topic, such as fan-out and thus the caller will not be able to update or remove the topic.

If the caller has suitable permissions then it could still subscribe to the topic, but the topic's specification may be different from that requested.

EXISTS_MISMATCH

EXISTS_MISMATCH: TopicAddFailReason = new TopicAddFailReason(2, 'The topic already exists, with different details')

The topic already exists, with different details.

INVALID_DETAILS

INVALID_DETAILS: TopicAddFailReason = new TopicAddFailReason(4, 'The topic details are invalid')

The topic details are invalid.

INVALID_NAME

INVALID_NAME: TopicAddFailReason = new TopicAddFailReason(15, 'The supplied topic path is invalid.')

The supplied topic path is invalid.

PERMISSIONS_FAILURE

PERMISSIONS_FAILURE: TopicAddFailReason = new TopicAddFailReason(7, 'Invalid permissions to add a topic at the specified path')

Invalid permissions to add a topic at the specified path.

UNEXPECTED_ERROR

UNEXPECTED_ERROR: TopicAddFailReason = new TopicAddFailReason(9, 'An unexpected error occured while creating the topic')

An unexpected error occured while creating the topic.

Const TopicUpdateNamespace

TopicUpdateNamespace: object

TopicCreationResult

TopicCreationResult: TopicCreationResult = TopicCreationResult

UpdateConstraintOperator

UpdateConstraintOperator: UpdateConstraintOperator = UpdateConstraintOperator

Const Types

Types: object

Enum like object of point types

ABSOLUTE_SEQUENCE

ABSOLUTE_SEQUENCE: Type = new Type(1, 'from', 'to', '')

ABSOLUTE_START

ABSOLUTE_START: Type = new Type(0, 'fromStart', 'toStart', '')

ABSOLUTE_TIME

ABSOLUTE_TIME: Type = new Type(2, 'from', 'to', ' ms')

NEXT_COUNT

NEXT_COUNT: Type = new Type(5, null, 'next', '')

NEXT_TIME

NEXT_TIME: Type = new Type(6, null, 'next', ' ms')

OFFSET_SEQUENCE

OFFSET_SEQUENCE: Type = new Type(3, 'fromLast', 'untilLast', '')

OFFSET_TIME

OFFSET_TIME: Type = new Type(4, 'fromLast', 'untilLast', ' ms')

PREVIOUS_COUNT

PREVIOUS_COUNT: Type = new Type(7, null, 'previous', '')

PREVIOUS_TIME

PREVIOUS_TIME: Type = new Type(8, null, 'previous', ' ms')

Const UNSUBSCRIBE

UNSUBSCRIBE: object

id

id: number = 4

request

request: TopicSelectionRequestSerialiserClass = TopicSelectionRequestSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const UNSUBSCRIBE_ALL

UNSUBSCRIBE_ALL: object

id

id: number = 199

request

request: TopicSelectorSerialiserClass = TopicSelectorSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const UNSUBSCRIBE_ALL_BY_FILTER

UNSUBSCRIBE_ALL_BY_FILTER: object

id

id: number = 200

request

request: UnsubscribeAllByFilterRequestSerialiserClass = UnsubscribeAllByFilterRequestSerialiser

response

response: ClientFilterSubscribeResponseSerialiserClass = ClientFilterSubscribeResponseSerialiser

Const UNSUBSCRIBE_ALL_CONTROL

UNSUBSCRIBE_ALL_CONTROL: object

id

id: number = 201

request

request: UnsubscribeAllControlRequestSerialiserClass = UnsubscribeAllControlRequestSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const UNSUBSCRIBE_CLIENT

UNSUBSCRIBE_CLIENT: object

id

id: number = 11

request

request: ClientSubscribeRequestSerialiserClass = ClientSubscribeRequestSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const UNSUBSCRIPTION_NOTIFICATION

UNSUBSCRIPTION_NOTIFICATION: object

id

id: number = 42

request

request: UnsubscriptionNotificationSerialiserClass = UnsubscriptionNotificationSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const UPDATE_LICENSE

UPDATE_LICENSE: object

id

id: number = 159

request

request: BytesSerialiserClass = BytesSerialiser

response

response: ReplaceLicenceResponseSerialiserClass = ReplaceLicenceResponseSerialiser

Const UPDATE_SECURITY_CONFIGURATION

UPDATE_SECURITY_CONFIGURATION: object

id

id: number = 60

request

request: SecurityCommandScriptSerialiserClass = SecurityCommandScriptSerialiser

response

response: ErrorReportListSerialiserClass = ErrorReportListSerialiser

Const UPDATE_SYSTEM_AUTHENTICATION

UPDATE_SYSTEM_AUTHENTICATION: object

id

id: number = 58

request

request: SecurityCommandScriptSerialiserClass = SecurityCommandScriptSerialiser

response

response: ErrorReportListSerialiserClass = ErrorReportListSerialiser

Const USER_PING

USER_PING: object

id

id: number = 56

request

request: AbstractSerialiser<null> = NullSerialiser

response

response: AbstractSerialiser<null> = NullSerialiser

Const UnsubscribeReasonEnum

UnsubscribeReasonEnum: object

Enum containing reasons that an unsubscription occurred.

Example:

// Use UnsubscribeReason to validate unsubscription notifications
session.addStream('>foo', diffusion.datatypes.string())
       .on('unsubscribe', function(topic, specification, reason) {
    switch (reason) {
        case diffusion.topics.UnsubscribeReason.REMOVED :
            // Do something if the topic was removed
        default :
            // Do something else if the client was explicitly unsubscribed
    }
});

AUTHORIZATION

AUTHORIZATION: UnsubscribeReason = new UnsubscribeReason(3, 'Not authorized to subscribe to this topic')

The unsubscription occurred because the session is no longer authorized to access the topic.

since

5.9

BACK_PRESSURE

BACK_PRESSURE: UnsubscribeReason = new UnsubscribeReason(5, 'The server has unsubscribed due to a backlog of messages')

The server has a significant backlog of messages for the session, and the topic specification has the conflation topic property set to 'unsubscribe'. The session can resubscribe to the topic. The unsubscription is not persisted to the cluster. If the session fails over to a different server it will be resubscribed to the topic.

since

6.1

BRANCH_MAPPINGS

BRANCH_MAPPINGS: UnsubscribeReason = new UnsubscribeReason(6, 'Branch mapping rules have changed')

The unsubscription occurred because branch mapping rules changed.

since

6.7

see

SessionTrees

CONTROL

CONTROL: UnsubscribeReason = new UnsubscribeReason(1, 'The server or another client unsubscribed this client')

The server or another client unsubscribed this client.

REMOVED

REMOVED: UnsubscribeReason = new UnsubscribeReason(2, 'The topic was removed')

The topic was removed

REQUESTED

REQUESTED: UnsubscribeReason = new UnsubscribeReason(0, 'The unsubscription was requested by this client')

The unsubscription was requested by this client.

STREAM_CHANGE

STREAM_CHANGE: UnsubscribeReason = new UnsubscribeReason(undefined, 'A more specific stream has been registered to the same path')

A fallback stream has been unsubscribed or subscribed due to the addition or removal of a stream that selects the topic.

since

5.9

SUBSCRIPTION_REFRESH

SUBSCRIPTION_REFRESH: UnsubscribeReason = new UnsubscribeReason(undefined, 'The server has re-subscribed this session')

The server has re-subscribed this session to the topic. Existing streams are unsubscribed because the topic type and other attributes may have changed.

This can happen if a set of servers are configured to use session replication, and the session connected to one server reconnects ('fails over') to a different server.

A stream that receives an unsubscription notification with this reason will also receive a subscription notification with the new TopicSpecification.

since

5.9

UNKNOWN_UNSUBSCRIBE_REASON

UNKNOWN_UNSUBSCRIBE_REASON: UnsubscribeReason = new UnsubscribeReason(4, 'Unknown unsubscribe reason')

A reason that is unsupported by the session.

since

6.1

Const UpdateFailReasonEnum

UpdateFailReasonEnum: object

The reason that a topic could not be updated.

Example:

session.topics.update('foo', 'bar').then(function() { ... }, function(err) {
    switch (err) {
        case diffusion.topics.UpdateFailReason.MISSING_TOPIC:
            ...
        case diffusion.topics.UpdateFailReason.EXCLUSIVE_UPDATER_CONFLICT:
            ...
    }
});

CLUSTER_REPARTITION

CLUSTER_REPARTITION: UpdateFailReason = new UpdateFailReason(9, 'When trying to update the topic the cluster was migrating the partition that owns the topic')

An update to a replicated topic failed because the cluster was repartitioning due to a server starting, stopping, or failing. The session can retry the operation.

DELTA_WITHOUT_VALUE

DELTA_WITHOUT_VALUE: UpdateFailReason = new UpdateFailReason(8, 'An attempt has been made to apply a delta to a topic that does not yet have a value')

An attempt has been made to apply a delta to a topic that has not yet has a value specified for it.

INCOMPATIBLE_STATE

INCOMPATIBLE_STATE: UpdateFailReason = new UpdateFailReason(10, 'An update could not be performed because the topic is managed by' +'a component (e.g fan-out) that prohibits updates from the caller')

An update could not be performed because the topic is managed by a component (e.g fan-out) that prohibits updates from the caller.

INCOMPATIBLE_UPDATE

INCOMPATIBLE_UPDATE: UpdateFailReason = new UpdateFailReason(1, 'Update type is incompatible with topic type')

The update was of a type that is not compatible with the topic it was submitted for, or the topic does not support updating.

INVALID_UPDATE_STREAM

INVALID_UPDATE_STREAM: UpdateFailReason = new UpdateFailReason(-2, 'The topic update failed because the update stream is no longer valid')

An update to a replicated topic failed because the cluster was repartitioning due to a server starting, stopping, or failing. The session can retry the operation.

MISSING_TOPIC

MISSING_TOPIC: UpdateFailReason = new UpdateFailReason(4, 'Topic does not exist')

The topic being updated does not exist.

UNSATISFIED_CONSTRAINT

UNSATISFIED_CONSTRAINT: UpdateFailReason = new UpdateFailReason(-1, 'The topic update failed because the constraint was not satisfied')

An update was not performed because the constraint was not satisfied.

UPDATE_FAILED

UPDATE_FAILED: UpdateFailReason = new UpdateFailReason(2, 'Update failed - possible content incompatibility')

The update failed, possibly because the content sent with the update was invalid/incompatible with topic type or data format.

Const constraintSerialisers

constraintSerialisers: object

The serialisers for each constraint type

[ConstraintType.CONJUNCTION]

[ConstraintType.CONJUNCTION]: "/builds/engineering/diffusion/javascript/js-uci-client-doc/target/js-uci-client/shared/internal/services/constraints/compound-serialiser" = CompoundSerialiser

[ConstraintType.DISJUNCTION]

[ConstraintType.DISJUNCTION]: "/builds/engineering/diffusion/javascript/js-uci-client-doc/target/js-uci-client/shared/internal/services/constraints/compound-serialiser" = CompoundSerialiser

[ConstraintType.LOCKED]

[ConstraintType.LOCKED]: "/builds/engineering/diffusion/javascript/js-uci-client-doc/target/js-uci-client/shared/internal/services/constraints/locked-serialiser" = LockedSerialiser

[ConstraintType.NO_TOPIC]

[ConstraintType.NO_TOPIC]: "/builds/engineering/diffusion/javascript/js-uci-client-doc/target/js-uci-client/shared/internal/services/constraints/no-topic-serialiser" = NoTopicSerialiser

[ConstraintType.NO_VALUE]

[ConstraintType.NO_VALUE]: "/builds/engineering/diffusion/javascript/js-uci-client-doc/target/js-uci-client/shared/internal/services/constraints/no-value-serialiser" = NoValueSerialiser

[ConstraintType.PARTIAL_JSON]

[ConstraintType.PARTIAL_JSON]: "/builds/engineering/diffusion/javascript/js-uci-client-doc/target/js-uci-client/shared/internal/services/constraints/partial-json-serialiser" = PartialJSONSerialiser

[ConstraintType.TOPIC_VALUE]

[ConstraintType.TOPIC_VALUE]: "/builds/engineering/diffusion/javascript/js-uci-client-doc/target/js-uci-client/shared/internal/services/constraints/topic-value-constraint-serialiser" = TopicValueConstraintSerialiser

[ConstraintType.UNCONSTRAINED]

[ConstraintType.UNCONSTRAINED]: "/builds/engineering/diffusion/javascript/js-uci-client-doc/target/js-uci-client/shared/internal/services/constraints/unconstrained-serialiser" = UnconstrainedSerialiser

Const monitoredPingService

monitoredPingService: object

Service implementation to provide Ping functionality.

Intended to provide basic Ping functionality by immediately responding to a received request, by which the round-trip latency between the sender and receiver may be ascertained.

This implementation is monitored. It notifies the session activity monitor of the ping.

onRequest

  • Handle an inbound request.

    Parameters

    Returns void

Const noop

noop: object

A ConnectionActivityMonitor that does nothing

onSystemPing

  • onSystemPing(): void
  • Returns void

shutdown

  • shutdown(): void
  • Returns void

Const notifySubscriptionService

notifySubscriptionService: object

Notify subscriptions

onRequest

  • Handle an inbound request.

    Parameters

    Returns void

Const notifyUnsubscriptionService

notifyUnsubscriptionService: object

Notification of unsubscription,

onRequest

  • Handle an inbound request.

    Parameters

    Returns void

Const pingService

pingService: object

Service implementation to provide Ping functionality.

Intended to provide basic Ping functionality by immediately responding to a received request, by which the round-trip latency between the sender and receiver may be ascertained.

onRequest

  • Handle an inbound request

    Parameters

    Returns void

Const responseCodes

responseCodes: object

Connection handshake response codes

AUTHENTICATION_FAILED

AUTHENTICATION_FAILED: ResponseCode = code(116, 'Connection failed - authentication failed')

CONNECTION_PROTOCOL_ERROR

CONNECTION_PROTOCOL_ERROR: ResponseCode = code(115, 'Connection failed - protocol error')

DOWNGRADE

DOWNGRADE: ResponseCode = code(102, 'Server does not support the requested protocol level')

LICENSE_EXCEEDED

LICENSE_EXCEEDED: ResponseCode = code(113, 'Connection rejected due to license limit')

OK

OK: ResponseCode = code(100, 'Connected successfully')

RECONNECTED

RECONNECTED: ResponseCode = code(105, 'Reconnected successfully')

RECONNECTED_WITH_MESSAGE_LOSS

RECONNECTED_WITH_MESSAGE_LOSS: ResponseCode = code(106, 'Reconnected with message loss')

RECONNECTION_FAILED_MESSAGE_LOSS

RECONNECTION_FAILED_MESSAGE_LOSS: ResponseCode = code(118, 'Reconnection failed due to message loss')

RECONNECTION_UNSUPPORTED

RECONNECTION_UNSUPPORTED: ResponseCode = code(114, 'Reconnection not supported by connector')

REJECTED_SERVER_INITIALISING

REJECTED_SERVER_INITIALISING: ResponseCode = code(119, 'Connection rejected because the server is not ready')

UNKNOWN_SESSION

UNKNOWN_SESSION: ResponseCode = code(117, 'Reconnection failed - the session is unknown')

Const sessionActivityMonitorFactory

sessionActivityMonitorFactory: object

create

NOOP

NOOP: object

onConnectionClosed

  • onConnectionClosed(): void
  • Returns void

onNewConnection

  • onNewConnection(): void
  • Returns void

onSystemPing

  • onSystemPing(): void
  • Returns void

Const sessionContext

sessionContext: object

The context sharing core datatypes and enums with the features. In the modular client, this constant is packaged with the core diffusion package.

AbstractDataType

AbstractDataType: AbstractDataType = AbstractDataType

CloseReason

CloseReason: CloseReasonImpl = CloseReasonImpl

DataTypes

DataTypes: DataTypesImpl = DataTypes

ErrorReason

ErrorReason: {} = ErrorReason

Type declaration

TimeSeriesEventDataType

TimeSeriesEventDataType: TimeSeriesEventDataType = TimeSeriesEventDataType

TopicAddFailReasonEnum

TopicAddFailReasonEnum: {} = TopicAddFailReasonEnum

Type declaration

TopicSpecification

TopicSpecification: TopicSpecification = TopicSpecification

TopicType

TopicType: TopicType = TopicType

parseSelector

parseSelector: (expression: string | TopicSelector | Array<string | TopicSelector>, ...args: Array<string | TopicSelector>) => AbstractTopicSelector = parseSelector

Type declaration

Const topicsNamespace

topicsNamespace: object

FetchRequest

FetchRequest: FetchRequest = FetchRequest

TopicAddFailReason

TopicAddFailReason: {} = TopicAddFailReasonEnum

Type declaration

TopicSpecification

TopicSpecification: TopicSpecification = TopicSpecification

TopicType

TopicType: TopicType = TopicType

UnsubscribeReason

UnsubscribeReason: {} = UnsubscribeReasonEnum

Type declaration

UpdateFailReason

UpdateFailReason: {} = UpdateFailReasonEnum

Type declaration

Copyright © 2025 DiffusionData Ltd. All Rights Reserved.