Package-level declarations
Types
An authorizer's answer: Allowed, or Denied with a Denied.code and a Denied.message.
The root command a synchronous call acts for, as the calling service asserts it: the call's command id commandId (the id its saga derived, so a wait that follows the saga finds it), and the root command's tenant tenantId, scope, operator and the causation that makes it a derived command, with the wait context a wait that follows the saga goes on with, and the root request's facts that propagate (RequestFacts.PROPAGATED), such as the calling application: only those, whatever the map it is built with holds, so a call never carries the client's address or User-Agent.
The reading and writing of the Wow-Call header, the call a service makes on another's internal port: a CallContext as the header's value, its CallWire as :spi's CallWires encodes it. Public for a caller that plays a peer, such as a test that sends a service the call another service's saga would. A fact that does not propagate is dropped as it is parsed (CallContext.facts).
Decides whether a caller may send a command, before its body is decoded (step 3). The instance-level check, whether the aggregate belongs to the caller's scope, is the kernel's, not an authorizer's.
The body of a ServerCommandRequest: JSON Bytes as received, a JSON Tree already parsed, or the command object itself (Value).
A command as a CommandValidator sees it: decoded and transformed, not yet decided. Fields may be added: construct it with of; the constructor is internal to Wow.
Admits commands: turns a ServerCommandRequest into an immutable Command and hands it to the WaitCoordinator of its context, which checks its wait plan, routes it and waits for it.
A request as a transformer sees it: decoded, before the command is built. Its identity may be incomplete: aggregateId is null when the request named none. The requestId, the caller and the tenantId the command runs in (the caller's, or the one the request targets) are only read: the command that runs keeps them.
The command a transformer sends, and to which aggregate: a body of type, decided by an aggregate the gateway serves, to the aggregate aggregateId of that type, with headers. The gateway builds the me.ahoo.wow.api.decide.Command from it by its usual rules: the tenant, the scope, the request id and the wait plan are the request's. A null aggregateId is allowed only for a command that creates its aggregate, whose id the gateway then generates.
Turns the commands of one input type into the command that runs: one command into one command, at admission, after the input is decoded and authorized and before the result is validated. A transformer may change the command's type, the aggregate it is sent to, its body and its headers; it cannot change the request id (retries stay idempotent), the tenant or the scope, or the wait plan, which CommandTarget has no field for. A command that must become several is a saga's work.
Validates a command that is decoded and transformed and not yet decided (CommandCandidate): the violations it finds, none when it is valid. Any violation refuses the command with FrameworkCodes.COMMAND_INVALID, listing them all. The gateway asks it of an admitted command, and so of a command from a peer, a saga's derived command, a command taken from a topic and a timer's.
The streams already committed for a request, and the claims of creations not committed yet: what admission reads before it gives a creation command without an id one. None of its members has a default and it is no fun interface, so that a lambda cannot stand for it: one that looked requests up and kept its claims to itself left the node's own gateway drawing a new id for every attempt (#6518). Build one with of.
The ids admission gives the creation commands that name none: a command, a client's or one a saga derived, whose request already committed takes the id of the aggregate it created, without drawing a new one, so a retry or a replay keeps it. Any other takes a new one from its aggregate type's generator in ids, so that every attempt of the request meets the others in one partition, where every log's request key is unique:
The aggregate models a node serves, found by their AggregateType (step 1).
A command type of a peer context's contract: its full name (ctx.agg.Command, or a system command's system name, wow.lifecycle.TransferOwner), its class, when on the class path (type), whether it creates its aggregate (creation), and the property of its body that holds its aggregate's id (idProperty; null for one whose request names it).
The commands of peer contexts that the CommandGateway admits: the aggregates of a context another service serves, known from the contract its api jar carries (contracts). Such a command is written to the peer's command topic, wow.<context>.commands, through the node's command sender, the path a saga's command to another context takes, and the peer's intake executes it. Without one, the node has no command transport and refuses them.
The server side of a CommandRequest: what the gateway receives from any client, the HTTP edge or the in-process client, before admission. A command a context's command topic delivers is admitted by the intake instead (ServiceCommandAdmission). What the route fixed (context, aggregate, command and, on an instance route, aggregateId), the undecoded body, who sent it (caller), and the facts the request's headers gave: a cross-scope targetScope (Wow-Scope), a requestId (Wow-Request-Id), an expectedVersion (If-Match), the request facts in headers, and the wait plan (Wow-Wait; the default plan when absent).
Decides whether a caller may call a service route, after authentication and before its request is decoded. The rule is the CommandAuthorizer's: a node's authorizers are all asked (allOf), the first Authorization.Denied is the answer, and there is no abstaining. With none registered, every authenticated caller may call the context's routes.
Functions
Whether this action's command is a C, or a subtype of it (CommandAction.commandIs).