Package org.dspace.matomo
Class MatomoAbstractHandler
java.lang.Object
org.dspace.matomo.MatomoAbstractHandler
- All Implemented Interfaces:
MatomoUsageEventHandler
- Direct Known Subclasses:
MatomoAsyncBulkRequestHandler,MatomoSyncEventHandler
This class represents an abstract class that will be used to handle the
UsageEvent.- Author:
- Vincenzo Mecca (vins01-4science - vincenzo.mecca at 4science.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final MatomoRequestDetailsBuilderprotected final MatomoClient -
Constructor Summary
ConstructorsConstructorDescriptionMatomoAbstractHandler(MatomoClient matomoClient, MatomoRequestDetailsBuilder builder) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidhandleEvent(UsageEvent usageEvent) This method handles theUsageEventin order to send that request to Matomoabstract voidSends all the pending request to the Matomo tracking endpoint.protected MatomoRequestDetailstoDetails(UsageEvent usageEvent) Converts a DSpace usage event into a Matomo request details object.
-
Field Details
-
matomoClient
-
builder
-
-
Constructor Details
-
MatomoAbstractHandler
-
-
Method Details
-
toDetails
Converts a DSpace usage event into a Matomo request details object.- Parameters:
usageEvent- The DSpace usage event to convert- Returns:
- MatomoRequestDetails object containing the converted event details
-
handleEvent
Description copied from interface:MatomoUsageEventHandlerThis method handles theUsageEventin order to send that request to Matomo- Specified by:
handleEventin interfaceMatomoUsageEventHandler
-
sendEvents
public abstract void sendEvents()Description copied from interface:MatomoUsageEventHandlerSends all the pending request to the Matomo tracking endpoint.- Specified by:
sendEventsin interfaceMatomoUsageEventHandler
-