Package jenkins.util
Class ContextResettingExecutorService
- java.lang.Object
-
- jenkins.util.InterceptingExecutorService
-
- jenkins.util.ContextResettingExecutorService
-
- All Implemented Interfaces:
Executor
,ExecutorService
public class ContextResettingExecutorService extends InterceptingExecutorService
ExecutorService
wrapper that resets the context classloader. This protects an executor service from poorly written callable that doesn't restore thread states correctly.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description ContextResettingExecutorService(ExecutorService base)
-
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> r)
-
Methods inherited from class jenkins.util.InterceptingExecutorService
awaitTermination, delegate, execute, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit, toString
-
-
-
-
Constructor Detail
-
ContextResettingExecutorService
public ContextResettingExecutorService(ExecutorService base)
-
-
Method Detail
-
wrap
protected Runnable wrap(Runnable r)
- Specified by:
wrap
in classInterceptingExecutorService
-
wrap
protected <V> Callable<V> wrap(Callable<V> r)
- Specified by:
wrap
in classInterceptingExecutorService
-
-