@PublicApi public interface OffRequestThreadExecutor extends Executor
JIRA uses a fair few ThreadLocal variables setup during HTTP requests to contain common information such as
the logged in user and their Locale and so on say via JiraAuthenticationContext
This class will help you run the off request thread code and clean up after it properly.
| Modifier and Type | Method and Description |
|---|---|
void |
execute(ApplicationUser runAsUser,
Runnable command)
Executes the code with the specified user in context via
JiraAuthenticationContext |
void |
execute(Runnable command)
Executes the code with No user in context via
JiraAuthenticationContext |
void execute(Runnable command)
JiraAuthenticationContextvoid execute(ApplicationUser runAsUser, Runnable command)
JiraAuthenticationContextrunAsUser - the user to run the code ascommand - the code to runCopyright © 2002-2019 Atlassian. All Rights Reserved.