CommandWire

class CommandWire(val type: String, val id: String, val requestId: String, val ref: AggregateRef, val body: JsonNode, val expectedVersion: Int? = null, val scope: Scope = Scope.NONE, val headers: Map<String, String> = emptyMap(), val causation: Causation? = null, val operator: Operator? = null, val replyTo: ReplyTo? = null, val caller: CallerWire? = null, val actingTenant: String? = null)

A command in its wire form: { type, id, requestId, ref, body, expectedVersion, scope, headers, causation, operator, replyTo }. type is the command type's model name, which the receiver reads body by; the wait plan does not travel, only a wait context does.

replyTo is set only on a command a saga sends to another context (an addition within format 1): where the target sends the receipt of a rejection, and, when it asks for one, of the commit. operator (an addition within format 1 too) is the command's operator; a reader of an older version ignores it, and one reading an older writer's command has none.

caller (an addition within format 1 too) is who sent the command, as admission resolved them (Command.caller): the target's access policy compares its claims. A derived command has none, and neither does an older writer's command nor one a producer wrote without one: under an access policy, a command that is not derived and has no caller is refused. Its claims travel in the cluster channel's requests and stay in the command topic's records for the topic's retention; they are never recorded in the log.

actingTenant (an addition within format 1 too) is the tenant its sender sent it for: the caller's, when the caller named no target; the execution's for a saga's command (its commit's, receipt's or job instance's); the scheduling aggregate's for a timer's. The target decides the command's tenant from it and the tenant ref names, by the one rule of every path (TenantPolicy.tenantOf): a ref naming its acting tenant names none, so a type the target fixes to a tenant is in it. A command without one (an older writer's, a producer's, a caller's that named its target) names the tenant of its ref.

Constructors

Link copied to clipboard
constructor(type: String, id: String, requestId: String, ref: AggregateRef, body: JsonNode, expectedVersion: Int? = null, scope: Scope = Scope.NONE, headers: Map<String, String> = emptyMap(), causation: Causation? = null, operator: Operator? = null, replyTo: ReplyTo? = null, caller: CallerWire? = null, actingTenant: String? = null)

Types

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
val body: JsonNode
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val id: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun copyWith(type: String = this.type, id: String = this.id, requestId: String = this.requestId, ref: AggregateRef = this.ref, body: JsonNode = this.body, expectedVersion: Int? = this.expectedVersion, scope: Scope = this.scope, headers: Map<String, String> = this.headers, causation: Causation? = this.causation, operator: Operator? = this.operator, replyTo: ReplyTo? = this.replyTo, caller: CallerWire? = this.caller, actingTenant: String? = this.actingTenant): CommandWire

This CommandWire with the given fields replaced: Wow's own copy, left out of the ABI.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String