Class ThreadClassLoaderManager
java.lang.Object
org.identityconnectors.framework.impl.api.local.ThreadClassLoaderManager
Provides a for managing the thread-local class loader
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidClear the thread-local instance of the manager.Returns the current thread-local class loaderstatic ThreadClassLoaderManagerReturns the thread-local instance of the managerpopAll()Hack for OIM.voidRestores the previous loader as the thread-local classloader.voidpushAll(List<ClassLoader> loaders) Hack for OIM.voidpushClassLoader(ClassLoader loader) Sets the given loader as the thread-local classloader.
-
Method Details
-
getInstance
Returns the thread-local instance of the manager- Returns:
- the thread-local instance of the manager
-
clearInstance
public static void clearInstance()Clear the thread-local instance of the manager. -
pushClassLoader
Sets the given loader as the thread-local classloader.- Parameters:
loader- The class loader. May be null.
-
popClassLoader
public void popClassLoader()Restores the previous loader as the thread-local classloader. -
popAll
Hack for OIM. See BundleClassLoader. Pops and returns all class loaders previously pushed, therefore effectively setting the thread's current context class loader to the initial class loader. -
pushAll
Hack for OIM. See BundleClassLoader. Pushes all class loaders in the list as the context class loader.- Parameters:
loaders- the loaders to push; never null.
-
getCurrentClassLoader
Returns the current thread-local class loader- Returns:
- the current thread-local class loader
-