Package-level declarations

Types

Link copied to clipboard
class ContractDirectory(val local: Manifest, peers: List<ManifestFragment> = emptyList()) : SubscriptionDirectory

The contracts a service knows: its own Manifest, local, and the peer contracts, peers (META-INF/wow/contract.json of each api jar on the class path, which the Gradle plugin packages from the context's domain module; load reads them), without the contexts local serves (PeerContracts.outside, DX gap G21: the service's own api is on its class path, and on a class path that several services share, another service's api carries no contract of this one). It answers, for any context of either:

Link copied to clipboard
class PeerEvents(contexts: List<ContextManifest>, classLoader: ClassLoader = PeerEvents::class.java.classLoader)

The events of the contexts a service knows, decoded into their api classes: an event of a published stream, context.aggregate.Event, is decoded into the class its context's contract names for it (#/$defs/<binary name>) when that class is on classLoader and the event is of the revision the contract declares; otherwise it is a PublishedEvent of its name, revision and JSON text. A matched class that does not decode the payload fails the handling, as a state that does not decode does.