Class DataFeedMutationHandler
java.lang.Object
com.broadleafcommerce.data.tracking.jpa.datafeed.DataFeedMutationHandler
- All Implemented Interfaces:
EventListener
,org.springframework.context.ApplicationListener<com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent>
public class DataFeedMutationHandler
extends Object
implements org.springframework.context.ApplicationListener<com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent>
Monitor
MutationNotifyEvent
occurrences for any entity types registered via
DataFeedInspection
bean instances. If detected and relevant, send a Spring Cloud Stream
message via IncrementalDataFeedEntityUpdateEvent
for subsequent data feed service
processing.-
Constructor Summary
ConstructorsConstructorDescriptionDataFeedMutationHandler
(com.broadleafcommerce.common.messaging.notification.DetachedDurableMessageSender sender, List<DataFeedInspection<? extends com.broadleafcommerce.data.tracking.core.Trackable>> inspections) -
Method Summary
Modifier and TypeMethodDescriptionvoid
onApplicationEvent
(com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent event) void
Send a generic pojo as an event message on the incremental data feed update channel.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Constructor Details
-
DataFeedMutationHandler
public DataFeedMutationHandler(com.broadleafcommerce.common.messaging.notification.DetachedDurableMessageSender sender, @Nullable List<DataFeedInspection<? extends com.broadleafcommerce.data.tracking.core.Trackable>> inspections)
-
-
Method Details
-
onApplicationEvent
public void onApplicationEvent(com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent event) - Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent>
-
sendEvent
Send a generic pojo as an event message on the incremental data feed update channel. Should generally relate to the fields and structure ofIncrementalDataFeedEntityUpdateEvent
from the data feed service version being used.- Parameters:
event
- The generic pojo to senddataRoute
- The data route on which to persist the durable state of the message. Optional if a route is already established on the current flow.
-