T - the type of the eventpublic interface EventHandlerContext<T extends Event> extends EventEnvelope<T>
| Modifier and Type | Method and Description |
|---|---|
<A extends CommandProcessingAggregate<A,CT>,CT extends Command> |
save(Class<A> entityClass,
CT command,
Optional<String> entityId)
Creates an aggregate in response to an event
|
<A extends CommandProcessingAggregate<A,CT>,CT extends Command> |
update(Class<A> entityClass,
String entityId,
CT command)
Updates an aggregate in response to an event
|
<A extends CommandProcessingAggregate<A,CT>,CT extends Command> |
updateWithProvidedCommand(Class<A> entityClass,
String entityId,
Function<A,Optional<CT>> commandProvider)
Updates an aggregate in response to an event
|
getEntityId, getEvent, getEventContext, getEventId, getEventMetadata, getEventType, getOffset, getSwimlane<A extends CommandProcessingAggregate<A,CT>,CT extends Command> CompletableFuture<EntityWithIdAndVersion<A>> save(Class<A> entityClass, CT command, Optional<String> entityId)
A - the aggregate classCT - the command classentityClass - the class of the aggregate to create, must be a subclass of CommandProcessingAggregatecommand - the command to processentityId - the optional id of the aggregate to create<A extends CommandProcessingAggregate<A,CT>,CT extends Command> CompletableFuture<EntityWithIdAndVersion<A>> update(Class<A> entityClass, String entityId, CT command)
A - the aggregate classCT - the command classentityClass - the class of the aggregate to create, must be a subclass of CommandProcessingAggregatecommand - the command to processentityId - the optional id of the aggregate to create<A extends CommandProcessingAggregate<A,CT>,CT extends Command> CompletableFuture<EntityWithIdAndVersion<A>> updateWithProvidedCommand(Class<A> entityClass, String entityId, Function<A,Optional<CT>> commandProvider)
A - the aggregate classCT - the command classentityClass - the class of the aggregate to create, must be a subclass of CommandProcessingAggregatecommandProvider - provides the command to processentityId - the optional id of the aggregate to createCopyright © 2021. All rights reserved.