@ExperimentalApi
public interface MauEventService
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.
Modifier and Type | Method and Description |
---|---|
LastSentKey |
getKeyWithCurrentApplication()
Collects together and then returns the Application key, email address and userId for the current MAU request
|
void |
setApplicationForThread(MauApplicationKey applicationKey)
Stores the provided application key in a thread local store to be retrieved later in the same thread when calling
triggerEvent() |
void |
setApplicationForThreadBasedOnProject(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 |
void |
triggerEvent()
Triggers an
MauEvent using the application previously set for this
request using setApplicationForThread(MauApplicationKey) or setApplicationForThreadBasedOnProject(Project) . |
void setApplicationForThread(@Nonnull MauApplicationKey applicationKey)
triggerEvent()
applicationKey
- the application servicing the current requestvoid setApplicationForThreadBasedOnProject(@Nullable Project project)
setApplicationForThread(MauApplicationKey)
by looking up
the appropriate ApplicationKey
based on the project type of the passed in
projectproject
- the project to use to look up the application keyLastSentKey getKeyWithCurrentApplication()
void triggerEvent()
MauEvent
using the application previously set for this
request using setApplicationForThread(MauApplicationKey)
or setApplicationForThreadBasedOnProject(Project)
.Copyright © 2002-2021 Atlassian. All Rights Reserved.