SimpleCommandMessageFactory

class SimpleCommandMessageFactory(validator: Validator, commandBuilderRewriterRegistry: CommandBuilderRewriterRegistry) : CommandMessageFactory

Simple implementation of CommandMessageFactory.

This factory validates commands, applies registered rewriters, and converts command builders to command messages. It supports both direct creation and rewriter-based transformation of command builders.

Parameters

validator

the validator for command validation

commandBuilderRewriterRegistry

registry of command builder rewriters

See also

Constructors

Link copied to clipboard
constructor(validator: Validator, commandBuilderRewriterRegistry: CommandBuilderRewriterRegistry)

Functions

Link copied to clipboard
open fun <TARGET : Any> create(body: Any): Mono<CommandMessage<TARGET>>

Creates a CommandMessage from a command body object.

open override fun <TARGET : Any> create(commandBuilder: CommandBuilder): Mono<CommandMessage<TARGET>>

Creates a CommandMessage from a CommandBuilder, applying validation and rewriters.