ListenerAttached

@Serializable
data class ListenerAttached(val listenerId: String, val role: ClientRole = ClientRole.LISTENER) : DevToolsMessage(source)

Sent by the server to a publisher when a new observer attaches.

The publisher answers with the baseline that observer needs: a full StateSync for a ClientRole.LISTENER, which replicates state, and a SessionHistorySync for a ClientRole.ORCHESTRATOR, which needs the captured initial state plus the action history in order to reconstruct the full application state at any point.

role defaults to ClientRole.LISTENER so older publishers, which only ever received this for listeners, keep their previous behaviour.

Constructors

Link copied to clipboard
constructor(listenerId: String, role: ClientRole = ClientRole.LISTENER)

Properties

Link copied to clipboard
Link copied to clipboard