DocumentClientSession class
CRDT-aware client session on server.
Implements the document sync protocol on top of ClientSession: handshake with version vectors, applying incoming changes to the CRDTServerRegistry and answering document status requests.
- Inheritance
-
- Object
- ClientSession
- DocumentClientSession
Constructors
-
DocumentClientSession({required String id, required TransportConnection connection, required CRDTServerRegistry serverRegistry, Compressor? compressor, MessageCodec<
Message> ? messageCodec, int? maxBufferSize, List<ServerSyncPlugin> plugins = const []}) - CRDT-aware client session on server.
Properties
-
events
→ Stream<
SessionEvent> -
Session events stream
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Session ID
finalinherited
- lastKnownVersionVector → VersionVector?
-
The client's most recently reported version vector, if any.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
subscribedDocuments
→ List<
String> -
The documents the client is subscribed to
no setterinherited
Methods
-
addSessionEvent(
SessionEvent event) → void -
Emit a SessionEvent on events.
inherited
-
close(
) → Future< void> -
Close the session
inherited
-
dispose(
) → void -
Dispose the session
inherited
-
handleTypedMessage(
Message message) → Future< void> -
Handle a protocol
message, after plugin dispatch.override -
handleUndecodable(
List< int> data) → void -
Called for an incoming
dataframe no codec could decode.inherited -
isSubscribedTo(
String documentId) → bool -
Check if the client is subscribed to
documentIdinherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerDocument(
String documentId, {bool notifyPlugins = true}) → void -
Mark this session as subscribed to
documentId.inherited -
sendMessage(
Message message) → Future< void> -
Send a message to the client
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited