Package fr.maif.eventsourcing
Interface ReactorCommandHandler<Error,State,Command,E extends fr.maif.eventsourcing.Event,Message,TxCtx>
- Type Parameters:
Error- the type of the error channelState- the type of the stateCommand- the type of the commandE- the type of the eventMessage- the type messageTxCtx- the type of the transaction context e.g the connection in a jdbc context
- All Superinterfaces:
fr.maif.eventsourcing.CommandHandlerGetter<Error,State, Command, E, Message, TxCtx>
public interface ReactorCommandHandler<Error,State,Command,E extends fr.maif.eventsourcing.Event,Message,TxCtx>
extends fr.maif.eventsourcing.CommandHandlerGetter<Error,State,Command,E,Message,TxCtx>
The command is the interface that need to be implemented in order to handle command.
-
Method Summary
Modifier and TypeMethodDescriptiondefault reactor.core.publisher.Mono<io.vavr.control.Either<Error,fr.maif.eventsourcing.Events<E, io.vavr.Tuple0>>> eventsAsync(E... events) default reactor.core.publisher.Mono<io.vavr.control.Either<Error,fr.maif.eventsourcing.Events<E, Message>>> eventsAsync(Message message, E... events) default reactor.core.publisher.Mono<io.vavr.control.Either<Error,fr.maif.eventsourcing.Events<E, Message>>> handleCommand(TxCtx ctx, io.vavr.control.Option<State> state, Command command)
-
Method Details
-
handleCommand
reactor.core.publisher.Mono<io.vavr.control.Either<Error,fr.maif.eventsourcing.Events<E, handleCommandMessage>>> (TxCtx ctx, io.vavr.control.Option<State> state, Command command) - Parameters:
ctx-state-command-- Returns:
-
eventsAsync
-
eventsAsync
-
events
-
events
-
fail
-
failAsync
-
commandHandler
-