Package com.adobe.acs.commons.util
Class ThreadContextClassLoaderTaskExecutor
java.lang.Object
com.adobe.acs.commons.util.ThreadContextClassLoaderTaskExecutor
Utility class for executing a particular task with a set Thread Context Class Loader.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <V> VdoWithTccl(ClassLoader classLoader, Callable<V> task) Execute the task while the Thread Context Class Loader is set to the provided Class Loader.
-
Method Details
-
doWithTccl
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
-