@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)
JiraAuthenticationContext
void execute(ApplicationUser runAsUser, Runnable command)
JiraAuthenticationContext
runAsUser
- the user to run the code ascommand
- the code to runCopyright © 2002-2015 Atlassian. All Rights Reserved.