Package com.adobe.acs.commons.util
Class ThreadContextClassLoaderTaskExecutor
- java.lang.Object
-
- com.adobe.acs.commons.util.ThreadContextClassLoaderTaskExecutor
-
@ProviderType public final class ThreadContextClassLoaderTaskExecutor extends Object
Utility class for executing a particular task with a set Thread Context Class Loader.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V> VdoWithTccl(ClassLoader classLoader, Callable<V> task)Execute the task while the Thread Context Class Loader is set to the provided Class Loader.
-
-
-
Method Detail
-
doWithTccl
public static <V> V doWithTccl(ClassLoader classLoader, Callable<V> task) throws Exception
Execute the task while the Thread Context Class Loader is set to the provided Class Loader.- Type Parameters:
V- the return type of the task- Parameters:
classLoader- the requested class loadertask- the task- Returns:
- the return value
- Throws:
Exception- the exception throw, if any, by the task
-
-