|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.util.loading.ContextClassLoaderSwitcher.SwitchContext
A helper class to remember the original classloader and avoid continually retrieveing the current thread.
Method Summary | |
void |
forceReset()
Force a reset back to the original classloader, useful when somebody else might have changed the thread context classloader so we cannot optimize |
ClassLoader |
getCurrentClassLoader()
Retrieve the current classloader (as set through this class). |
ClassLoader |
getOriginalClassLoader()
Retrieve the original classloader |
Thread |
getThread()
Retrieve the current thread |
void |
reset()
Reset back to the original classloader, only when it has changed. |
void |
setClassLoader(ClassLoader cl)
Change the context classloader |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public Thread getThread()
public ClassLoader getOriginalClassLoader()
public ClassLoader getCurrentClassLoader()
public void setClassLoader(ClassLoader cl)
The operation is ignored if the classloader is null or has not changed
cl
- the new classloaderpublic void reset()
public void forceReset()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |