CommandWire

class CommandWire @InternalWowApi constructor(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)

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.

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)

Types

Link copied to clipboard
object Companion

Properties

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): 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