|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.liferay.portal.kernel.util.ClassLoaderPool
public class ClassLoaderPool
Maps servlet context names to/from the servlet context's class loader.
Constructor Summary | |
---|---|
ClassLoaderPool()
|
Method Summary | |
---|---|
static ClassLoader |
getClassLoader(String contextName)
Returns the class loader associated with the context name. |
static String |
getContextName(ClassLoader classLoader)
Returns the context name associated with the class loader. |
static void |
register(String contextName,
ClassLoader classLoader)
|
static void |
unregister(ClassLoader classLoader)
|
static void |
unregister(String contextName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassLoaderPool()
Method Detail |
---|
public static ClassLoader getClassLoader(String contextName)
If no class loader is found for the context name, this method checks for an initialized portal class loader to return. In cases where this method is invoked from outside of a running portal, such as from a unit test or from an external tool, no portal class loader will be found. If no portal class loader is found, the thread's context class loader is returned as a fallback.
contextName
- the servlet context's name
public static String getContextName(ClassLoader classLoader)
If the class loader is null
or if no context name is
associated with the class loader, StringPool.BLANK
is returned.
classLoader
- the class loader
public static void register(String contextName, ClassLoader classLoader)
public static void unregister(ClassLoader classLoader)
public static void unregister(String contextName)
|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |