public class ThreadUtil
extends java.lang.Object
Constructor | Description |
---|---|
ThreadUtil() |
Modifier and Type | Method | Description |
---|---|---|
static <T> T |
cleanContextExceptionExecute(java.lang.ClassLoader contextLoader,
java.util.concurrent.Callable<T> callable) |
Stupid...
|
static <T> T |
cleanContextExceptionExecute(java.util.concurrent.Callable<T> callable) |
Short version of
cleanContextExceptionExecute(ClassLoader, Callable) passing in null
as context class loader. |
static <T> T |
cleanContextExecute(java.lang.ClassLoader contextLoader,
java.util.concurrent.Callable<T> callable) |
Execute a callable with a clean thread context and security context as
to avoid any passing on of thread context and security context to another
thread that may be spawned from here and may end up holding copies in the end.
|
static <T> T |
cleanContextExecute(java.util.concurrent.Callable<T> callable) |
Short version of
cleanContextExecute(ClassLoader, Callable) passing in null
as context class loader. |
public static <T> T cleanContextExceptionExecute(java.lang.ClassLoader contextLoader, java.util.concurrent.Callable<T> callable) throws java.lang.Exception
contextLoader
- A class loader to set as context class loadercallable
- A Callable
to invokeCallable
invocationjava.lang.Exception
public static <T> T cleanContextExceptionExecute(java.util.concurrent.Callable<T> callable) throws java.lang.Exception
cleanContextExceptionExecute(ClassLoader, Callable)
passing in null
as context class loader.callable
- A Callable
to invokeCallable
invocationjava.lang.Exception
public static <T> T cleanContextExecute(java.lang.ClassLoader contextLoader, java.util.concurrent.Callable<T> callable)
contextLoader
- A class loader to set as context class loadercallable
- A Callable
to invokeCallable
invocationpublic static <T> T cleanContextExecute(java.util.concurrent.Callable<T> callable)
cleanContextExecute(ClassLoader, Callable)
passing in null
as context class loader.callable
- A Callable
to invokeCallable
invocation