Interface ReactorCommandHandler<Error,State,Command,E extends fr.maif.eventsourcing.Event,Message,TxCtx>

Type Parameters:
Error - the type of the error channel
State - the type of the state
Command - the type of the command
E - the type of the event
Message - the type message
TxCtx - 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 Type
    Method
    Description
    default fr.maif.eventsourcing.CommandHandler<Error,State,Command,E,Message,TxCtx>
     
    default io.vavr.control.Either<Error,fr.maif.eventsourcing.Events<E,io.vavr.Tuple0>>
    events(E... events)
     
    default io.vavr.control.Either<Error,fr.maif.eventsourcing.Events<E,Message>>
    events(Message message, E... events)
     
    default 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 io.vavr.control.Either<Error,fr.maif.eventsourcing.Events<E,Message>>
    fail(Error error)
     
    default reactor.core.publisher.Mono<io.vavr.control.Either<Error,fr.maif.eventsourcing.Events<E,Message>>>
     
    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,Message>>> handleCommand(TxCtx ctx, io.vavr.control.Option<State> state, Command command)
      Parameters:
      ctx -
      state -
      command -
      Returns:
    • eventsAsync

      default reactor.core.publisher.Mono<io.vavr.control.Either<Error,fr.maif.eventsourcing.Events<E,io.vavr.Tuple0>>> eventsAsync(E... events)
    • eventsAsync

      default reactor.core.publisher.Mono<io.vavr.control.Either<Error,fr.maif.eventsourcing.Events<E,Message>>> eventsAsync(Message message, E... events)
    • events

      default io.vavr.control.Either<Error,fr.maif.eventsourcing.Events<E,io.vavr.Tuple0>> events(E... events)
    • events

      default io.vavr.control.Either<Error,fr.maif.eventsourcing.Events<E,Message>> events(Message message, E... events)
    • fail

      default io.vavr.control.Either<Error,fr.maif.eventsourcing.Events<E,Message>> fail(Error error)
    • failAsync

      default reactor.core.publisher.Mono<io.vavr.control.Either<Error,fr.maif.eventsourcing.Events<E,Message>>> failAsync(Error error)
    • commandHandler

      default fr.maif.eventsourcing.CommandHandler<Error,State,Command,E,Message,TxCtx> commandHandler()
      Specified by:
      commandHandler in interface fr.maif.eventsourcing.CommandHandlerGetter<Error,State,Command,E extends fr.maif.eventsourcing.Event,Message,TxCtx>