Class EventStoringSubscriber
java.lang.Object
com.reallifedeveloper.common.application.eventstore.EventStoringSubscriber
- All Implemented Interfaces:
DomainEventSubscriber<DomainEvent>
public final class EventStoringSubscriber
extends Object
implements DomainEventSubscriber<DomainEvent>
A
DomainEventSubscriber
that stores all events using a EventStore
.- Author:
- RealLifeDeveloper
-
Constructor Summary
ConstructorsConstructorDescriptionEventStoringSubscriber
(EventStore eventStore) Creates a newEventStoringSubscriber
that uses the givenEventStore
. -
Method Summary
Modifier and TypeMethodDescriptionClass
<? extends DomainEvent> Gives the type of domain event to handle.void
handleEvent
(DomainEvent event) Handles the given event.
-
Constructor Details
-
EventStoringSubscriber
Creates a newEventStoringSubscriber
that uses the givenEventStore
.- Parameters:
eventStore
- theEventStore
to use
-
-
Method Details
-
handleEvent
Description copied from interface:DomainEventSubscriber
Handles the given event.- Specified by:
handleEvent
in interfaceDomainEventSubscriber<DomainEvent>
- Parameters:
event
- the domain event to handle
-
eventType
Description copied from interface:DomainEventSubscriber
Gives the type of domain event to handle.- Specified by:
eventType
in interfaceDomainEventSubscriber<DomainEvent>
- Returns:
- the type of domain event to handle
-