Package kalix.javasdk.testkit.impl
Class EventSourcedEntityEffectsRunner<S,E>
Object
kalix.javasdk.testkit.impl.EventSourcedEntityEffectsRunner<S,E>
Extended by generated code, not meant for user extension
-
Constructor Summary
ConstructorsConstructorDescriptionEventSourcedEntityEffectsRunner
(kalix.javasdk.eventsourcedentity.EventSourcedEntity<S, E> entity) -
Method Summary
Modifier and TypeMethodDescriptiongetState()
protected abstract S
handleEvent
(S state, E event) 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.
-
Constructor Details
-
EventSourcedEntityEffectsRunner
-
-
Method Details
-
handleEvent
- Returns:
- The current state of the entity after applying the event
-
getState
- Returns:
- The current state of the entity
-
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
-