public final class ContextClassLoaderBinder extends Object
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 and Description |
---|
ContextClassLoaderBinder() |
Modifier and Type | Method and Description |
---|---|
static void |
bind(ClassLoader cl)
Deprecated.
use #doInContextClassLoader
|
static <T> T |
doInContextClassLoader(ClassLoader cl,
Callable<T> callable)
Execute a runnable under a given context classloader
|
static void |
unbind()
Deprecated.
use #doInContextClassLoader
|
public ContextClassLoaderBinder()
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 callableException
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.