create

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

Creates a CommandMessage from a CommandBuilder.

Return

a Mono emitting the created CommandMessage

Parameters

TARGET

the type of the command body

commandBuilder

the command builder containing all message properties


open fun <TARGET : Any> create(body: Any): Mono<CommandMessage<TARGET>>

Creates a CommandMessage from a command body object.

This convenience method creates a default CommandBuilder from the body and then converts it to a CommandMessage.

Return

a Mono emitting the created CommandMessage

Parameters

TARGET

the type of the command body

body

the command payload object