@univerjs-pro/collaboration-client v0.5.0-beta.1Docs


Class: CollaborationSession

The data structure to represent a collaboration session. It also manages the collaborator’s identity.

An collaboration session maps to a unit.

Extends

Implements

Constructors

new CollaborationSession()

new CollaborationSession(
   _unitID, 
   socket$, 
   _logService, 
   _beforeCloseService, 
   _messageService, 
   _configService, 
   _localeService, 
   _memberService, 
   _commentService, 
   _telemetryService?): CollaborationSession

Parameters

ParameterType
_unitIDstring
socket$Observable<Nullable<ICollaborationSocket>>
_logServiceILogService
_beforeCloseServiceIBeforeCloseService
_messageServiceIMessageService
_configServiceIConfigService
_localeServiceLocaleService
_memberServiceMemberService
_commentServiceCommentService
_telemetryService?ITelemetryService

Returns

CollaborationSession

Overrides

RxDisposable.constructor

Defined in

packages/collaboration-client/src/services/collaboration-session/collaboration-session.ts:44

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseRxDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93
dispose$protectedSubject<void>undefinedRxDisposable.dispose$submodules/univer/packages/core/src/shared/lifecycle.ts:117
event$readonlyObservable<ICollaborationEvent>undefined-packages/collaboration-client/src/services/collaboration-session/collaboration-session.ts:38
sessionStatus$readonlyObservable<SessionStatus>undefined-packages/collaboration-client/src/services/collaboration-session/collaboration-session.ts:32

Accessors

sessionStatus

Get Signature

get sessionStatus(): SessionStatus
Returns

SessionStatus

Defined in

packages/collaboration-client/src/services/collaboration-session/collaboration-session.ts:33

Methods

close()

close(): void

Returns

void

Defined in

packages/collaboration-client/src/services/collaboration-session/collaboration-session.ts:105


dispose()

dispose(): void

Returns

void

Implementation of

IDisposable.dispose

Overrides

RxDisposable.dispose

Defined in

packages/collaboration-client/src/services/collaboration-session/collaboration-session.ts:99


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

RxDisposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

RxDisposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100


getMemberID()

getMemberID(): null | string

Returns

null | string

Defined in

packages/collaboration-client/src/services/collaboration-session/collaboration-session.ts:95


send()

send(event, unitID): Promise<void>

Send event to the collaboration server.

Parameters

ParameterType
eventICollaborationEvent
unitIDstring

Returns

Promise<void>

Defined in

packages/collaboration-client/src/services/collaboration-session/collaboration-session.ts:212