SimpleClientCommandExchange

class SimpleClientCommandExchange<C : Any>(val message: CommandMessage<C>, val waitStrategy: WaitStrategy, val attributes: MutableMap<String, Any> = ConcurrentHashMap()) : ClientCommandExchange<C>

Simple implementation of ClientCommandExchange.

This class provides a basic implementation of the client command exchange, storing the command message, wait strategy, and any additional attributes.

Parameters

C

the type of the command

message

the command message being processed

waitStrategy

the strategy for waiting on command results

attributes

mutable map for storing additional exchange data

See also

Constructors

Link copied to clipboard
constructor(message: CommandMessage<C>, waitStrategy: WaitStrategy, 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>
Link copied to clipboard
open override val waitStrategy: WaitStrategy

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 fun <T : Any> extractDeclared(type: Class<T>): T?
Link copied to clipboard
open fun <T : Any> extractObject(type: KType): T?
Link copied to clipboard
Link copied to clipboard
open fun <T> getAttribute(key: String): T?
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 current error object.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setAttribute(key: String, value: Any): ClientCommandExchange<C>
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
Link copied to clipboard