Package com.atlassian.jira.event.mau
Interface MauEventService
- All Known Implementing Classes:
MauEventServiceImpl
@ExperimentalApi
public interface MauEventService
Service to help with triggering eyeball events used to define monthly active users in JIRA.
Implementations should allow clients to set an MauApplicationKey for the current request/thread. Clients
can then trigger an event with the correct application set on the event using the triggerEvent()
method. This will usually be done at the end of the servlet filter chain or explicitly in some rare circumstances.
- Since:
- v7.0.1
-
Method Summary
Modifier and TypeMethodDescriptionCollects together and then returns the Application key, email address and userId for the current MAU requestvoidsetApplicationForThread(MauApplicationKey applicationKey) Stores the provided application key in a thread local store to be retrieved later in the same thread when callingtriggerEvent()voidConvencience method that does the same assetApplicationForThread(MauApplicationKey)by looking up the appropriateApplicationKeybased on the project type of the passed in projectvoidTriggers anMauEventusing the application previously set for this request usingsetApplicationForThread(MauApplicationKey)orsetApplicationForThreadBasedOnProject(Project).
-
Method Details
-
setApplicationForThread
Stores the provided application key in a thread local store to be retrieved later in the same thread when callingtriggerEvent()- Parameters:
applicationKey- the application servicing the current request
-
setApplicationForThreadBasedOnProject
Convencience method that does the same assetApplicationForThread(MauApplicationKey)by looking up the appropriateApplicationKeybased on the project type of the passed in project- Parameters:
project- the project to use to look up the application key
-
getKeyWithCurrentApplication
LastSentKey getKeyWithCurrentApplication()Collects together and then returns the Application key, email address and userId for the current MAU request- Returns:
- LastSentKey containing the key, email address and userID for the current mau requets
-
triggerEvent
void triggerEvent()Triggers anMauEventusing the application previously set for this request usingsetApplicationForThread(MauApplicationKey)orsetApplicationForThreadBasedOnProject(Project).
-