|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.util.ContextClassLoaderSwitchingUtil
public class ContextClassLoaderSwitchingUtil
Utility to run Runnable implementations in a different ClassLoader.
| Constructor Summary | |
|---|---|
ContextClassLoaderSwitchingUtil()
|
|
| Method Summary | |
|---|---|
static void |
runInContext(java.lang.ClassLoader newClassLoader,
java.lang.Runnable runnable)
Executes the provided Runnable implementation in the specified ClassLoader. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContextClassLoaderSwitchingUtil()
| Method Detail |
|---|
public static void runInContext(java.lang.ClassLoader newClassLoader,
java.lang.Runnable runnable)
Runnable implementation in the specified ClassLoader.
Utilises the ClassLoaderStack.push(java.lang.ClassLoader) method to save the old ClassLoader and
set the one specified as newClassLoader. ClassLoaderStack.pop() is
called in a finally block to ensure the ClassLoader is set back to the original one.
newClassLoader - The ClassLoader to run the specified Runnable in.runnable - The implementation to be run in the specified ClassLoader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||