|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.core.api.util.ContextClassLoaderBinder
public final class ContextClassLoaderBinder
Utility class that binds/unbinds the context ClassLoader of the current Thread
using a ThreadLocal.
NOTE: doInContextClassLoader(ClassLoader, java.util.concurrent.Callable)
is the only safe way to use this class,
do not use deprecated bind(ClassLoader)
or unbind()
methods.
Constructor Summary | |
---|---|
ContextClassLoaderBinder()
|
Method Summary | ||
---|---|---|
static void |
bind(ClassLoader cl)
Deprecated. use #doInContextClassLoader |
|
static
|
doInContextClassLoader(ClassLoader cl,
Callable<T> callable)
Execute a runnable under a given context classloader |
|
static void |
unbind()
Deprecated. use #doInContextClassLoader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContextClassLoaderBinder()
Method Detail |
---|
public static void bind(ClassLoader cl)
public static void unbind()
public static <T> T doInContextClassLoader(ClassLoader cl, Callable<T> callable) throws Exception
cl
- the classloader to set as the thread context classloadercallable
- the callable
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |