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 Details

    • setApplicationForThread

      void setApplicationForThread(@Nonnull MauApplicationKey applicationKey)
      Stores the provided application key in a thread local store to be retrieved later in the same thread when calling triggerEvent()
      Parameters:
      applicationKey - the application servicing the current request
    • setApplicationForThreadBasedOnProject

      void setApplicationForThreadBasedOnProject(@Nullable Project project)
      Convencience method that does the same as setApplicationForThread(MauApplicationKey) by looking up the appropriate ApplicationKey based 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 an MauEvent using the application previously set for this request using setApplicationForThread(MauApplicationKey) or setApplicationForThreadBasedOnProject(Project).