toEventStream

fun ObjectNode.toEventStream(type: AggregateType, eventType: (String) -> Class<*>?): EventStream

This events query record (EventQueryGateways.kt) of type, each event's body decoded as the class eventType gives its name, an ObjectNode when it gives none. A body masked whole, an event the node's Manifest does not know, stays the JSON null it was answered as (a NullNode). So does a schedule's event read into its class (ScheduleSet) whose command was masked whole, a command whose schema the node does not hold: the class holds a command, so the event is answered with no body, as an event masked whole is. Read as a tree (an ObjectNode, when eventType gives no class), it keeps its body, the masked command null in it.