Package jenkins.security
Class SecurityContextExecutorService
- java.lang.Object
-
- jenkins.util.InterceptingExecutorService
-
- jenkins.security.SecurityContextExecutorService
-
- All Implemented Interfaces:
Executor
,ExecutorService
public class SecurityContextExecutorService extends InterceptingExecutorService
Creates a delegatingExecutorService
implementation whose submit and related methods capture the current SecurityContext and then wrap any runnable/callable objects in another runnable/callable that sets the context before execution and resets it afterwards.- Since:
- 1.561
- Author:
- Patrick McKeown, Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description SecurityContextExecutorService(ExecutorService service)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Runnable
wrap(Runnable r)
protected <V> Callable<V>
wrap(Callable<V> c)
-
Methods inherited from class jenkins.util.InterceptingExecutorService
awaitTermination, delegate, execute, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit, toString
-
-
-
-
Constructor Detail
-
SecurityContextExecutorService
public SecurityContextExecutorService(ExecutorService service)
-
-
Method Detail
-
wrap
protected Runnable wrap(Runnable r)
- Specified by:
wrap
in classInterceptingExecutorService
-
wrap
protected <V> Callable<V> wrap(Callable<V> c)
- Specified by:
wrap
in classInterceptingExecutorService
-
-