RegisteredNode class

A node currently registered with the hub, with its live connection and liveness bookkeeping.

Constructors

RegisteredNode({required NodeDescriptor descriptor, required Connection connection, required DateTime lastSeen, Principal? principal, String? connectionId, int lastHeartbeatSeq = 0, int activeSessions = 0})
Creates a registered-node record.

Properties

activeSessions int
Number of sessions currently routed to this node (application-maintained).
getter/setter pair
connection → Connection
The control connection serving this node.
final
connectionId String?
An id identifying this connection/peer, for reverse lookup (NodeRegistry.byConnectionId). Assigned by the gateway on register.
final
descriptor ↔ NodeDescriptor
The node's public descriptor (mutable as status/labels change).
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id → NodeId
The node's id.
no setter
lastHeartbeatSeq int
The last accepted heartbeat sequence number.
getter/setter pair
lastSeen DateTime
When the hub last heard from the node.
getter/setter pair
principal → Principal?
The authenticated principal behind the node connection, if any.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state Map<String, Object?>
Scratch space for application-owned per-node state, keyed by the application (e.g. the last resource-metrics snapshot, a lease, a scheduler cursor).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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