ContractClasses

Whether the classes a peer contract lists are where its consumer runs, context by context: a consumer may hold a context's contract with none of its classes and address it by JSON; it may not hold it with only some of them. A context's commands and events all live in its api module, so some of them present and others not is a contract and types of different versions (a Maven build resolving the two apart), which would fail later, at decoding. The build's merge and the node's startup check every contract on their class path (problems), each finding a class its own way: the merge in its class path's entries, the node in its class loader (locator).

Functions

Link copied to clipboard
fun locator(classLoader: ClassLoader): (String) -> String?

Where classLoader holds a class, by its binary name: the jar's file name, or the directory; null for none.

Link copied to clipboard
fun problems(contract: ManifestFragment, locate: (String) -> String?): List<String>

Why contract does not hold together with its types: one problem per class of a context that locate finds in no class path entry while it finds others of that context, naming the contract's ManifestFragment.source and the entries the context's present classes come from; none for a context whose classes are all there, or none of them.