CommandIndex

The commands of manifests by their schemas, the one rule that names a command class: the command of the schema #/$defs/<binary name> in whichever context decides it is <context>.<aggregate>.<Command>; and their routes by their full type names, the only routes a client sends a command to (routeOf). A mounted command is only an edge's, which no one sends, and is left out. A system command (SystemCommands) is named by its system name on its target (systemCommandTypeOf): an aggregate's lifecycle commands and snapshot rebuild, and a context's schedule job commands, whose target is the context's job aggregate (<context>.schedule). On a conflict the first Manifest's wins. A node's contract directory and wow-client both name commands through it.

Constructors

Link copied to clipboard
constructor(manifests: List<Manifest>)

Functions

Link copied to clipboard

The aggregate types (context.aggregate) that list a command of the schema schema, a mounted one left out.

Link copied to clipboard
fun commandTypeOf(reference: String): String?

The full type name (ctx.agg.Command) of the command reference names: a schema reference (#/$defs/<binary name>) resolves to the command of that schema; a full type name is itself when a context decides it. Null when no context decides it.

fun commandTypeOf(target: String, type: Class<*>): String?

The full type name of the command class type on the aggregate type target (context.aggregate), or null when that aggregate type decides none of its schema: of a class several aggregates decide, the one of target.

Link copied to clipboard
fun idPropertyOf(commandType: String): String?

The property of the body of a command of commandType (ctx.agg.Command) that holds its aggregate's id (CommandManifest.idProperty); null for one whose request names its aggregate.

Link copied to clipboard
fun isInternal(commandType: String): Boolean

Whether the command type commandType (ctx.agg.Command) is internal (CommandManifest.internal): taken on its service's internal port alone, from another service, never on the public routes.

Link copied to clipboard
fun routeOf(commandType: String, byId: Boolean): RouteManifest?

The route of the command type commandType (ctx.agg.Command) to an aggregate by its id when byId, else one that names no id (CommandRoutes.routeOf); null when no contract lists that route.

Link copied to clipboard
fun schemaOf(commandType: String): String?

The schema reference of the command type commandType (ctx.agg.Command).

Link copied to clipboard
fun systemCommandTypeOf(target: String, name: String): String?

The full type name of the system command name (wow.lifecycle.DeleteAggregate, a SystemCommands name) on the aggregate type target (context.aggregate, context.schedule for a job command); null when its contract lists none there.