Skip to main content
Version: v1

IDocumentDeltaConnection Interface

Signature

export interface IDocumentDeltaConnection extends IDisposable, IEventProvider<IDocumentDeltaConnectionEvents>

Extends: IDisposable, IEventProvider<IDocumentDeltaConnectionEvents

Properties

PropertyModifiersTypeDescription
checkpointSequenceNumberoptionalnumberLast known sequence number to ordering service at the time of connection It may lap actual last sequence number (quite a bit, if container is very active). But it's best information for client to figure out how far it is behind, at least for "read" connections. "write" connections may use own "join" op to similar information, that is likely to be more up-to-date.
claimsITokenClaimsClaims for the client
clientIdstringClientID for the connection
existingbooleanWhether the connection was made to a new or existing document
initialClientsISignalClient[]Prior clients already connected.
initialMessagesISequencedDocumentMessage[]Messages sent during the connection
initialSignalsISignalMessage[]Signals sent during the connection
modeConnectionModeMode of the client
relayServiceAgentoptionalstringProperties that server can send to client to tell info about node that client is connected to. For ex, for spo it could contain info like build version, environment, region etc. These properties can be logged by client to better understand server environment etc. and use it in case error occurs. Format: "prop1:val1;prop2:val2;prop3:val3"
serviceConfigurationIClientConfigurationConfiguration details provided by the service
versionstringProtocol version being used with the service

Methods

MethodReturn TypeDescription
submit(messages)voidSubmit a new message to the server
submitSignal(message)voidSubmit a new signal to the server

Property Details

checkpointSequenceNumber

Last known sequence number to ordering service at the time of connection It may lap actual last sequence number (quite a bit, if container is very active). But it's best information for client to figure out how far it is behind, at least for "read" connections. "write" connections may use own "join" op to similar information, that is likely to be more up-to-date.

Signature

checkpointSequenceNumber?: number;

Type: number

claims

Claims for the client

Signature

claims: ITokenClaims;

Type: ITokenClaims

clientId

ClientID for the connection

Signature

clientId: string;

Type: string

existing

Whether the connection was made to a new or existing document

Signature

existing: boolean;

Type: boolean

initialClients

Prior clients already connected.

Signature

initialClients: ISignalClient[];

Type: ISignalClient[]

initialMessages

Messages sent during the connection

Signature

initialMessages: ISequencedDocumentMessage[];

Type: ISequencedDocumentMessage[]

initialSignals

Signals sent during the connection

Signature

initialSignals: ISignalMessage[];

Type: ISignalMessage[]

mode

Mode of the client

Signature

mode: ConnectionMode;

Type: ConnectionMode

relayServiceAgent

Properties that server can send to client to tell info about node that client is connected to. For ex, for spo it could contain info like build version, environment, region etc. These properties can be logged by client to better understand server environment etc. and use it in case error occurs. Format: "prop1:val1;prop2:val2;prop3:val3"

Signature

relayServiceAgent?: string;

Type: string

serviceConfiguration

Configuration details provided by the service

Signature

serviceConfiguration: IClientConfiguration;

Type: IClientConfiguration

version

Protocol version being used with the service

Signature

version: string;

Type: string

Method Details

submit

Submit a new message to the server

Signature

submit(messages: IDocumentMessage[]): void;

Parameters

ParameterTypeDescription
messagesIDocumentMessage[]

submitSignal

Submit a new signal to the server

Signature

submitSignal(message: any): void;

Parameters

ParameterTypeDescription
messageany