RoundRobinRouter

Routes arriving QObject instances to receivers in cyclic order, distributing successive instances round-robin regardless of their content.

Parameters

receivers

the destinations to cycle through, which must be non-empty

Constructors

Link copied to clipboard
constructor(receivers: List<QObjectReceiverIfc>)

Functions

Link copied to clipboard
open override fun destinations(): List<QObjectReceiverIfc>

The possible destinations this router may select, for graph introspection.

Link copied to clipboard
open override fun resetRouter()

Resets any per-replication routing state to its initial condition. Stateless routers need not override this. A StationNetwork calls this on each registered router at the start of every replication, so stateful routers (for example, round-robin) should be registered with the network.

Link copied to clipboard

Selects the receiver for the supplied qObject. Implementations must return a non-null receiver; supply a default/fallback to guarantee this.