CommandDispatcher

class CommandDispatcher(val name: String = CommandDispatcher::class.simpleName!!, val parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, val namedAggregates: Set<NamedAggregate> = MetadataSearcher.localAggregates, commandBus: CommandBus, aggregateProcessorFactory: AggregateProcessorFactory, commandHandler: CommandHandler, serviceProvider: ServiceProvider, schedulerSupplier: AggregateSchedulerSupplier = DefaultAggregateSchedulerSupplier("CommandDispatcher")) : AbstractDispatcher<ServerCommandExchange<*>>

Command Dispatcher .

Author

ahoo wang

Constructors

Link copied to clipboard
constructor(name: String = CommandDispatcher::class.simpleName!!, parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, namedAggregates: Set<NamedAggregate> = MetadataSearcher.localAggregates, commandBus: CommandBus, aggregateProcessorFactory: AggregateProcessorFactory, commandHandler: CommandHandler, serviceProvider: ServiceProvider, schedulerSupplier: AggregateSchedulerSupplier = DefaultAggregateSchedulerSupplier("CommandDispatcher"))

Properties

Link copied to clipboard
open override val name: String
Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()

Closes the dispatcher and all its aggregate dispatchers.

Link copied to clipboard
open override fun newAggregateDispatcher(namedAggregate: NamedAggregate, messageFlux: Flux<ServerCommandExchange<*>>): MessageDispatcher

Creates a new message dispatcher for a specific named aggregate.

Link copied to clipboard
open override fun receiveMessage(namedAggregate: NamedAggregate): Flux<ServerCommandExchange<*>>

Creates a flux of messages for the specified named aggregate.

Link copied to clipboard
open override fun run()

Starts the dispatcher by running all aggregate dispatchers.