Class EventSourcedEntityEffectsRunner<S,E>

Object
kalix.javasdk.testkit.impl.EventSourcedEntityEffectsRunner<S,E>

public abstract class EventSourcedEntityEffectsRunner<S,E> extends Object
Extended by generated code, not meant for user extension
  • Constructor Details

    • EventSourcedEntityEffectsRunner

      public EventSourcedEntityEffectsRunner(kalix.javasdk.eventsourcedentity.EventSourcedEntity<S,E> entity)
  • Method Details

    • handleEvent

      protected abstract S handleEvent(S state, E event)
      Returns:
      The current state of the entity after applying the event
    • getState

      public S getState()
      Returns:
      The current state of the entity
    • getAllEvents

      public List<E> getAllEvents()
      Returns:
      All events emitted by command handlers of this entity up to now
    • interpretEffects

      protected <R> EventSourcedResult<R> interpretEffects(Supplier<kalix.javasdk.eventsourcedentity.EventSourcedEntity.Effect<R>> effect, kalix.javasdk.Metadata metadata)
      creates a command context to run the commands, then creates an event context to run the events, and finally, creates a command context to run the side effects. It cleans each context after each run.
      Returns:
      the result of the side effects