create
open override fun <TARGET : Any> create(commandBuilder: CommandBuilder): Mono<CommandMessage<TARGET>>
Creates a CommandMessage from a CommandBuilder, applying validation and rewriters.
The process involves:
Checking for registered rewriters for the command type
If no rewriter found, directly convert to CommandMessage
If rewriter found, validate the command and apply the rewriter
Convert the rewritten builder to CommandMessage
Return
a Mono emitting the created CommandMessage
Parameters
TARGET
the type of the command body
commandBuilder
the command builder to process
See also
Throws
if rewriter returns empty Mono