SimpleServerCommandExchange

class SimpleServerCommandExchange<C : Any>(val message: CommandMessage<C>, val attributes: MutableMap<String, Any> = ConcurrentHashMap()) : ServerCommandExchange<C>

Simple implementation of ServerCommandExchange.

This class provides a basic implementation of the server command exchange, storing the command message and any additional attributes for command processing.

Parameters

C

the type of the command

message

the command message being processed

attributes

mutable map for storing additional exchange data

See also

Constructors

Link copied to clipboard
constructor(message: CommandMessage<C>, attributes: MutableMap<String, Any> = ConcurrentHashMap())

Properties

Link copied to clipboard
open override val attributes: MutableMap<String, Any>
Link copied to clipboard
open override val message: CommandMessage<C>

Functions

Link copied to clipboard
open fun acknowledge(): Mono<Void>
Link copied to clipboard
open override fun clearError()

Clears the current error object.

Link copied to clipboard
open override fun <T : Any> extractDeclared(type: Class<T>): T?

Extracts an object of the specified type from the exchange context.

Link copied to clipboard
open fun <T : Any> extractObject(type: KType): T?
Link copied to clipboard

Gets the aggregate processor responsible for handling this command.

Link copied to clipboard
open override fun getAggregateVersion(): Int?
Link copied to clipboard
open fun <T> getAttribute(key: String): T?
Link copied to clipboard
open fun <R> getCommandInvokeResult(): R?

Gets the result of invoking the command on the aggregate.

Link copied to clipboard
open override fun getCommandResult(): Map<String, Any>
open override fun <R> getCommandResult(key: String): R?
Link copied to clipboard
open override fun getError(): Throwable?

Gets the error that occurred during command processing.

Link copied to clipboard

Gets the event stream generated by the command execution.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Sets the aggregate processor responsible for handling this command.

Link copied to clipboard
open fun setAggregateVersion(aggregateVersion: Int): ServerCommandExchange<C>

Sets the version of the aggregate after command processing.

Link copied to clipboard
open fun setAttribute(key: String, value: Any): ServerCommandExchange<C>
Link copied to clipboard
Link copied to clipboard

Sets the result of invoking the command on the aggregate.

Link copied to clipboard
open override fun setCommandResult(key: String, value: Any)
Link copied to clipboard
open override fun setError(throwable: Throwable)

Sets the error object for this context.

Link copied to clipboard

Sets the event stream generated by the command execution.

Link copied to clipboard
Link copied to clipboard