ParticipantMessageHandler class
Handles coordination when this node is a participant
- Inheritance
-
- Object
- CoordinationMessageHandler
- ParticipantMessageHandler
- Mixed-in types
Constructors
- ParticipantMessageHandler({required CoordinationState state, required Node thisNode, required CoordinationSessionConfig sessionConfig})
Properties
-
events
→ Stream<
ControllerEvent> -
Single event stream for all participant handler events.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- onConnectionProbeReply ↔ void Function(ConnectionTestResponseMessage reply)?
-
Called with replies that carry clock-probe timestamps, so the owner can
feed them to an estimator. Left null when clock sync is not running.
getter/setter pairinherited
- onMembershipLost ↔ void Function()?
-
Called when the coordinator's topology no longer has this node in it,
though this node had been accepted.
getter/setter pair
- onSessionEnd ↔ void Function(SessionEndMessage message)?
-
Called when the coordinator says the session is over.
getter/setter pair
-
outgoingMessages
→ Stream<
CoordinationMessage> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionConfig → CoordinationSessionConfig
-
finalinherited
- state → CoordinationState
-
finalinherited
- thisNode → Node
-
finalinherited
Methods
-
announceLeaving(
) → Future< void> -
broadcastStreamReady(
String streamName) → Future< void> -
canHandle(
CoordinationMessageType type) → bool -
Check if this handler should process the given message type
override
-
confirmConnection(
{Duration timeout = const Duration(seconds: 10), int maxRetries = 3}) → Future< bool> - Performs bidirectional connection confirmation before sending critical messages
-
dispose(
) → void -
handleMessage(
CoordinationMessage message) → Future< void> -
Handle incoming coordination message
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
respondToConnectionTest(
ConnectionTestMessage message) → Future< void> -
Answers a connection test, echoing back what the requester needs to close
an NTP quadruple.
inherited
-
routeConnectionTestResponse(
ConnectionTestResponseMessage message) → bool -
Filters a reply to this node and hands clock probes to the estimator.
inherited
-
sendConnectionProbe(
String peerUId, int waveId, int probeIndex) → Future< void> -
Sends one clock probe to
peerUId.inherited -
sendHeartbeat(
) → Future< void> -
sendJoinRequest(
) → Future< void> -
sendJoinRequestWithConfirmation(
) → Future< void> - join request with connection confirmation
-
sendMessage(
CoordinationMessage message) → Future< void> -
Send outgoing coordination message
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited