Class LoggingDomainEventSubscriber
java.lang.Object
com.reallifedeveloper.common.domain.event.LoggingDomainEventSubscriber
- All Implemented Interfaces:
DomainEventSubscriber<DomainEvent>
public class LoggingDomainEventSubscriber
extends Object
implements DomainEventSubscriber<DomainEvent>
A
DomainEventSubscriber that logs all events using Slf4j.- Author:
- RealLifeDeveloper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends DomainEvent>Gives the type of domain event to handle.voidhandleEvent(DomainEvent event) Handles the given event.
-
Constructor Details
-
LoggingDomainEventSubscriber
public LoggingDomainEventSubscriber()
-
-
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
-