Router
A Router both receives a QObject and immediately sends it onward, choosing the destination as a function of the arriving instance. It is the QObject-aware generalization of QObjectSender: its selectNextReceiver is passed the instance being routed, so data-dependent routing (by type, by condition, by attribute) is expressible directly.
A router exposes its candidate destinations so that a StationNetwork can introspect and validate the routing graph.
Inheritors
Properties
Functions
Action invoked just after the selected receiver receives the instance.
Action invoked just before the selected receiver receives the instance.
The possible destinations this router may select, for graph introspection.
The statically known receivers this node may route to. Best-effort: empty when the node has no static link or when its routing is opaque (for example, a probabilistic sender whose destinations are not introspectable).
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.
Selects the receiver for the supplied qObject. Implementations must return a non-null receiver; supply a default/fallback to guarantee this.