Package-level declarations

Types

Link copied to clipboard
class CommandResult @InternalWowApi constructor(val format: Int = FORMAT, val commandId: String, val requestId: String, val correlationId: String, val ref: AggregateRef, val hop: Hop, val function: FunctionInfo, val status: CommandResult.Status, val version: Int? = null, val duplicate: Boolean = false, val error: ErrorInfo? = null, val results: Map<String, Any> = emptyMap(), val derived: List<String> = emptyList(), val signalTime: Long, val transformedFrom: TransformedFrom? = null, val chainEnded: Boolean = false, val pending: List<Hop> = emptyList())

The one outward result of a command, answered over HTTP and SSE, carried by wait signals and cross-context receipts: what the command reached at one hop of its wait chain.

Link copied to clipboard
class ErrorInfo @InternalWowApi constructor(val code: String, val message: String, val violations: List<Violation> = emptyList(), val extensions: Map<String, Any?> = emptyMap())

Why a command was rejected or failed: an error code (wow.* or a domain's own), a message, violations, and the rejection's structured extensions, which an HTTP problem writes as its extension members.

Link copied to clipboard

The error codes the framework itself answers with, wow.*, once, where every module that produces or reads one sees them: the kernel's rejections, admission's, the runtime's results, the query routes' and the internal port's. A domain's own codes are not among them, and a domain does not reject with one.

Link copied to clipboard
class FunctionInfo @InternalWowApi constructor(val kind: FunctionKind, val context: String, val processor: String, val name: String)

Who produced a result: a function of kind in context. A subscription is named processor.function, so processor and name come from its definition; for a command they are the aggregate and the command's name.

Link copied to clipboard

The kind of function that produced a result.

Link copied to clipboard
class Hop @InternalWowApi constructor(val stage: Stage, val context: String? = null, val subscription: String? = null)

One hop of a wait chain: a stage, in a bounded context, of a subscription when the stage is Stage.HANDLED.

Link copied to clipboard
enum class Stage : Enum<Stage>

How far a command has come. There are three stages; which kind of subscription handled a commit (a projection, a reactor, a saga, the snapshot) is the subscription's own business, not a stage of its own.

Link copied to clipboard
class TransformedFrom @InternalWowApi constructor(val command: String, val aggregateId: String? = null)

The command a request named before a transformer turned it into the one that ran: its full type name command (context.aggregate.Command) and the aggregate id the request gave, null when it gave none.

Link copied to clipboard
class Violation @InternalWowApi constructor(val path: String, val code: String, val message: String)

A field-level validation error: the path of the field, a code and a human-readable message.

Link copied to clipboard
class WaitPlan @InternalWowApi constructor(val hops: List<Hop>, val timeout: Duration = DEFAULT_TIMEOUT, val isDefault: Boolean = false)

What the caller of a command waits for (–): the hops of a chain, reached in order, within timeout. It stays on the node that took the command; what travels with the command's messages is a wait context instead.

Link copied to clipboard
class WaitSignal @InternalWowApi constructor(val format: Int = FORMAT, val waitId: String, val result: CommandResult)

A wait signal: the result one hop reached for the wait waitId, sent to the node that waits. Signals are deduplicated by (waitId, the result's hop and command, its source): the source is the result's CommandResult.function, the context and function that signalled it.