Class EventStoreRestController
java.lang.Object
com.brodygaudel.bank.command.controller.EventStoreRestController
@RestController
@RequestMapping("/events/store")
public class EventStoreRestController
extends Object
REST controller for handling event store-related operations.
This controller provides an endpoint for retrieving events stored in the event store for a specific aggregate ID. It utilizes the Event Store to read and return the events as a Stream.
-
Constructor Summary
ConstructorDescriptionEventStoreRestController
(org.axonframework.eventsourcing.eventstore.EventStore eventStore) Constructs a new instance of EventStoreRestController. -
Method Summary
Modifier and TypeMethodDescriptiongetEventStored
(String id) Endpoint for retrieving events stored in the event store for a specific aggregate ID.
-
Constructor Details
-
EventStoreRestController
public EventStoreRestController(org.axonframework.eventsourcing.eventstore.EventStore eventStore) Constructs a new instance of EventStoreRestController.- Parameters:
eventStore
- The Event Store used for retrieving stored events.
-
-
Method Details
-
getEventStored
Endpoint for retrieving events stored in the event store for a specific aggregate ID.- Parameters:
id
- The unique identifier of the aggregate for which events are to be retrieved.- Returns:
- A Stream of DomainEventMessage representing the events stored for the specified aggregate ID.
-