ManifestAssembly

The one assembly of a service's Manifest from its modules' fragments, the build's (mergeManifest) and the node's at startup alike, so the Manifest a service serves is the one its build wrote: the fragments merged (ManifestMerger), naming the service, then a subscription of another context's events by type given the aggregates the peer contracts list them under (PeerSources), then each command a subscription refers to by its class named by its wire name, as the service's contexts and the peer contracts decide it (CommandReferences).

Functions

Link copied to clipboard
fun assemble(fragments: List<ManifestFragment>, service: ServiceInfo, contracts: List<Manifest>, systemCommands: Map<String, String>, locate: (String) -> String?): Manifest

The Manifest of service, assembled from fragments with the peer contracts; locate finds a class on the class path, which an event no contract lists is named with (PeerSources.resolve). A command a saga refers to by its class is named by the command it is (CommandReferences.resolve), a system command by systemCommands, the system names of the commands a saga sends by their classes' binary names: every caller gives the same set, or the node would serve another Manifest than its build wrote.