Class ClickStreamListener
- java.lang.Object
-
- de.hybris.platform.servicelayer.event.impl.AbstractEventListener<AbstractTrackingEvent>
-
- com.hybris.ymkt.clickstream.listeners.ClickStreamListener
-
- All Implemented Interfaces:
java.util.EventListener,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<AbstractTrackingEvent>
public class ClickStreamListener extends AbstractEventListener<AbstractTrackingEvent>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<java.lang.String>allowedEventsprotected java.util.concurrent.ConcurrentLinkedQueue<AbstractTrackingEvent>batchQueueprotected intbatchSizeprotected ClickStreamServiceclickStreamServiceprotected FlexibleSearchServiceflexibleSearchServiceprotected static java.util.function.Predicate<java.lang.String>STRING_IS_EMPTYprotected static java.util.function.Predicate<java.lang.String>STRING_IS_NOT_EMPTYprotected UserContextServiceuserContextServiceprotected YmktConsentServiceymktConsentService
-
Constructor Summary
Constructors Constructor Description ClickStreamListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractTrackingEventenrich(AbstractTrackingEvent event)protected booleanfilterByAllowedEvents(AbstractTrackingEvent event)protected booleanfilterByConsent(AbstractTrackingEvent event)protected booleanfilterByProductEvents(AbstractTrackingEvent event)protected voidonEvent(AbstractTrackingEvent event)This method is called byApplicationListener.onApplicationEvent(ApplicationEvent)and processes the given event.protected java.util.Optional<java.util.List<AbstractTrackingEvent>>prepareBatchEvents()voidsetAllowedEvents(java.util.List<java.lang.String> allowedEvents)voidsetBatchSize(int batchSize)voidsetClickStreamService(ClickStreamService clickStreamService)voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService)voidsetUserContextService(UserContextService userContextService)voidsetYmktConsentService(YmktConsentService ymktConsentService)-
Methods inherited from class de.hybris.platform.servicelayer.event.impl.AbstractEventListener
afterPropertiesSet, onApplicationEvent, setApplicationContext, setClusterService, setTenantService
-
-
-
-
Field Detail
-
STRING_IS_EMPTY
protected static final java.util.function.Predicate<java.lang.String> STRING_IS_EMPTY
-
STRING_IS_NOT_EMPTY
protected static final java.util.function.Predicate<java.lang.String> STRING_IS_NOT_EMPTY
-
allowedEvents
protected final java.util.Set<java.lang.String> allowedEvents
-
batchQueue
protected final java.util.concurrent.ConcurrentLinkedQueue<AbstractTrackingEvent> batchQueue
-
batchSize
protected int batchSize
-
clickStreamService
protected ClickStreamService clickStreamService
-
flexibleSearchService
protected FlexibleSearchService flexibleSearchService
-
userContextService
protected UserContextService userContextService
-
ymktConsentService
protected YmktConsentService ymktConsentService
-
-
Method Detail
-
enrich
protected AbstractTrackingEvent enrich(AbstractTrackingEvent event)
-
filterByAllowedEvents
protected boolean filterByAllowedEvents(AbstractTrackingEvent event)
-
filterByConsent
protected boolean filterByConsent(AbstractTrackingEvent event)
-
filterByProductEvents
protected boolean filterByProductEvents(AbstractTrackingEvent event)
-
onEvent
protected void onEvent(AbstractTrackingEvent event)
Description copied from class:AbstractEventListenerThis method is called byApplicationListener.onApplicationEvent(ApplicationEvent)and processes the given event.- Specified by:
onEventin classAbstractEventListener<AbstractTrackingEvent>- Parameters:
event- the event to be processed- See Also:
ApplicationListener.onApplicationEvent(ApplicationEvent)
-
prepareBatchEvents
protected java.util.Optional<java.util.List<AbstractTrackingEvent>> prepareBatchEvents()
-
setAllowedEvents
public void setAllowedEvents(java.util.List<java.lang.String> allowedEvents)
-
setBatchSize
public void setBatchSize(int batchSize)
-
setClickStreamService
public void setClickStreamService(ClickStreamService clickStreamService)
-
setFlexibleSearchService
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
setUserContextService
public void setUserContextService(UserContextService userContextService)
-
setYmktConsentService
public void setYmktConsentService(YmktConsentService ymktConsentService)
-
-