WsCoordinationStream class

Coordination stream over a hub. Reliable, ordered, JSON.

Inheritance
Mixed-in types

Constructors

WsCoordinationStream({required CoordinationStreamConfig config, required WsConnection connection, required String sessionName, required Node streamNode})

Properties

carriesSenderClock → bool
Whether this transport already puts the sender's clock on the wire.
no setterinherited
channelCount → int
Number of channels in the stream.
no setterinherited
clockSyncs → Stream<ClockSyncSample>
Clock-offset estimates for this stream's peers, as they are made.
no setterinherited
config → CoordinationStreamConfig
Configuration for the stream. This is a NetworkStreamConfig object.
finalinherited
connection → WsConnection
final
consumers → List<String>
List of consumer node IDs.
no setterinherited
created → bool
Indicates whether the ILifecycle implementation has been created.
no setterinherited
dataType → StreamDataType
Data type of the stream. This is a StreamDataType enum value.
no setterinherited
description → String?
Returns a description of the identity.
no setteroverride
descriptor → PeerDescriptor
no setterinherited
disposed → bool
Indicates whether the ILifecycle implementation has been disposed.
no setterinherited
endpointId → String
no setterinherited
hasConsumers → bool
Whether the stream has any current consumers.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
hasProducers → bool
Whether the stream has any current producers.
no setterinherited
id → String
Identifier for the stream, derived from the config hash code.
no setterinherited
inbox → Stream<StringMessage>
Incoming messages from peers.
no setterinherited
manager → IResourceManager?
gets the resource manager that manages this resource
no setterinherited
messageClass → Type
no setterinherited
name → String
Human-readable name for the stream.
no setterinherited
outbox → StreamSink<StringMessage>
no setterinherited
outletConsumerPresence → Stream<bool>
Emits when this stream's publishing endpoint gains or loses every subscriber, where the transport can tell.
no setterinherited
paused → bool
no setterinherited
producers → List<String>
List of producer node IDs.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sampleRate → double
Sample rate of the stream.
no setterinherited
sessionName → String
final
shadowUId ↔ String?
getter/setter pairinherited
sharesSenderClockDomain → bool
Whether both ends of this stream read the same PeerClock.
no setterinherited
started → bool
Whether the stream is currently running.
no setterinherited
streamNode → Node
no setteroverride
uId → String
Returns a unique identifier that is guaranteed to be globally unique.
no setterinherited

Methods

addConsumer(Node consumer) → void
Adds a consumer node to this stream.
inherited
addInlet(PeerHandle handle) → Future<void>
Subscribes to a peer found by discovery.
inherited
addProducer(Node producer) → void
Adds a producer node to this stream.
inherited
create() → Future<void>
Creates.
inherited
createInletsForNodes(Iterable<Node> nodes, {Duration resolveTimeout = const Duration(seconds: 10)}) → Future<void>
Subscribes to every node in nodes, resolving their endpoints first.
inherited
createOutlet() → Future<void>
Creates this node's publishing endpoint.
inherited
decodeControlPayload(Object payload) → StringMessage?
Builds a message from a relayed JSON payload.
override
decodeSample(Uint8List frame) → StringMessage?
Builds a message from a binary sample frame. Null for streams that do not carry samples.
inherited
destroyStream() → Future<void>
Stops and releases the stream's endpoints.
inherited
dispose() → Future<void>
Disposes the ILifecycle implementation, releasing any resources.
inherited
encodeForWire(StringMessage message) → Object
JSON-encodable form of message for the control path.
override
flushStreams() → Future<void>
Discards anything buffered.
inherited
isConsumer(Node node) → bool
Checks if a given node is a consumer for this stream.
inherited
isProducer(Node node) → bool
Checks if a given node is a producer for this stream.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() → FutureOr<void>
Pauses the implementation.
inherited
pauseStream() → Future<void>
Pauses, if running and not already paused.
inherited
publishSample(List<Object?> channels) → void
Publishes a sample using the binary framing.
inherited
recreateOutlet() → Future<void>
Recreates the publishing endpoint to reflect a changed Node.
inherited
removeInlet(String nodeUId) → Future<void>
Unsubscribes from a peer, releasing whatever that inlet holds.
inherited
resume() → FutureOr<void>
Resumes the implementation.
inherited
resumeStream({bool flushBeforeResume = true}) → Future<void>
Resumes, if running and paused.
inherited
resumeWith({bool flushBeforeResume = true}) → Future<void>
Resumes, optionally discarding data buffered while paused.
inherited
sendMessage(StringMessage message) → FutureOr<void>
inherited
setStreamNode(Node node) → void
override
start() → Future<void>
Begins publishing and delivering. Idempotent.
inherited
stop() → Future<void>
Stops publishing and delivering, but keeps the stream usable.
inherited
toString() → String
A string representation of this object.
inherited
updateManager(IResourceManager? newManager) → void
inherited
updateNode(Node newNode) → void
Replaces the Node this stream publishes as.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited