Package org.dspace.google
Class GoogleAsyncEventListener
- java.lang.Object
-
- org.dspace.usage.AbstractUsageEventListener
-
- org.dspace.google.GoogleAsyncEventListener
-
- All Implemented Interfaces:
EventListener
public class GoogleAsyncEventListener extends AbstractUsageEventListener
Notifies Google Analytics of Bitstream VIEW events. These events are stored in memory and then asynchronously processed by a single seperate thread.- Author:
- April Herron, Luca Giamminonni
-
-
Field Summary
Fields Modifier and Type Field Description static intGA_MAX_EVENTS
-
Constructor Summary
Constructors Constructor Description GoogleAsyncEventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.commons.collections.BuffergetEventsBuffer()List<GoogleAnalyticsClient>getGoogleAnalyticsClients()voidinit()voidreceiveEvent(Event event)voidsendCollectedEvents()Send the collected events to Google Analytics.voidsetGoogleAnalyticsClients(List<GoogleAnalyticsClient> googleAnalyticsClients)-
Methods inherited from class org.dspace.usage.AbstractUsageEventListener
getEventNamePrefixes, getResourcePrefix, setEventService
-
-
-
-
Field Detail
-
GA_MAX_EVENTS
public static final int GA_MAX_EVENTS
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
@PostConstruct public void init()
-
receiveEvent
public void receiveEvent(Event event)
-
sendCollectedEvents
public void sendCollectedEvents()
Send the collected events to Google Analytics.
-
getGoogleAnalyticsClients
public List<GoogleAnalyticsClient> getGoogleAnalyticsClients()
-
setGoogleAnalyticsClients
public void setGoogleAnalyticsClients(List<GoogleAnalyticsClient> googleAnalyticsClients)
-
getEventsBuffer
public org.apache.commons.collections.Buffer getEventsBuffer()
-
-