@univerjs-pro/collaboration-client v0.5.4


Class: CollaborationSession

Defined in: packages/collaboration-client/src/services/collaboration-session/collaboration-session.ts:37

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, 
   _configService, 
   _localeService, 
   _memberService, 
   _commentService, 
   _collaborationUIEventService, 
   _telemetryService?): CollaborationSession

Defined in: packages/collaboration-client/src/services/collaboration-session/collaboration-session.ts:51

Parameters

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

Returns

CollaborationSession

Overrides

RxDisposable.constructor

Properties

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

Accessors

sessionStatus

Get Signature

get sessionStatus(): SessionStatus

Defined in: packages/collaboration-client/src/services/collaboration-session/collaboration-session.ts:40

Returns

SessionStatus

Methods

close()

close(): void

Defined in: packages/collaboration-client/src/services/collaboration-session/collaboration-session.ts:111

Returns

void


dispose()

dispose(): void

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

Returns

void

Implementation of

IDisposable.dispose

Overrides

RxDisposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

RxDisposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

RxDisposable.ensureNotDisposed


getMemberID()

getMemberID(): null | string

Defined in: packages/collaboration-client/src/services/collaboration-session/collaboration-session.ts:101

Returns

null | string


send()

send(event, unitID): Promise<void>

Defined in: packages/collaboration-client/src/services/collaboration-session/collaboration-session.ts:213

Send event to the collaboration server.

Parameters

ParameterType
eventICollaborationEvent
unitIDstring

Returns

Promise<void>