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 newEventStoringSubscriberthat uses the givenEventStore. -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends DomainEvent>Gives the type of domain event to handle.voidhandleEvent(DomainEvent event) Handles the given event.
-
Constructor Details
-
EventStoringSubscriber
Creates a newEventStoringSubscriberthat uses the givenEventStore.- Parameters:
eventStore- theEventStoreto use
-
-
Method Details
-
handleEvent
Description copied from interface:DomainEventSubscriberHandles the given event.- Specified by:
handleEventin interfaceDomainEventSubscriber<DomainEvent>- Parameters:
event- the domain event to handle
-
eventType
Description copied from interface:DomainEventSubscriberGives the type of domain event to handle.- Specified by:
eventTypein interfaceDomainEventSubscriber<DomainEvent>- Returns:
- the type of domain event to handle
-