Package org.eclipse.jetty.webapp
Class CachingWebAppClassLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- java.security.SecureClassLoader
-
- java.net.URLClassLoader
-
- org.eclipse.jetty.webapp.WebAppClassLoader
-
- org.eclipse.jetty.webapp.CachingWebAppClassLoader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,ClassVisibilityChecker
@ManagedObject @Deprecated(since="2021-05-27") public class CachingWebAppClassLoader extends WebAppClassLoader
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.A WebAppClassLoader that cachesgetResource(String)
results. Specifically this ClassLoader caches not found classes and resources, which can greatly increase performance for applications that search for resources.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.webapp.WebAppClassLoader
WebAppClassLoader.Context
-
-
Constructor Summary
Constructors Constructor Description CachingWebAppClassLoader(java.lang.ClassLoader parent, WebAppClassLoader.Context context)
Deprecated.CachingWebAppClassLoader(WebAppClassLoader.Context context)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clearCache()
Deprecated.java.net.URL
getResource(java.lang.String name)
Deprecated.Get a resource from the classloader NOTE: this method provides a convenience of hacking off a leading / should one be present.java.lang.Class<?>
loadClass(java.lang.String name)
Deprecated.java.lang.String
toString()
Deprecated.-
Methods inherited from class org.eclipse.jetty.webapp.WebAppClassLoader
addClassFileTransformer, addClassPath, addClassPath, addJars, addTransformer, close, getContext, getName, getPermissions, getResources, isServerClass, isSystemClass, removeClassFileTransformer, removeTransformer, runWithServerClassAccess, setName
-
Methods inherited from class java.net.URLClassLoader
findResource, findResources, getResourceAsStream, getURLs, newInstance, newInstance
-
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, getDefinedPackage, getDefinedPackages, getParent, getPlatformClassLoader, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus
-
-
-
-
Constructor Detail
-
CachingWebAppClassLoader
public CachingWebAppClassLoader(java.lang.ClassLoader parent, WebAppClassLoader.Context context) throws java.io.IOException
Deprecated.- Throws:
java.io.IOException
-
CachingWebAppClassLoader
public CachingWebAppClassLoader(WebAppClassLoader.Context context) throws java.io.IOException
Deprecated.- Throws:
java.io.IOException
-
-
Method Detail
-
getResource
public java.net.URL getResource(java.lang.String name)
Deprecated.Description copied from class:WebAppClassLoader
Get a resource from the classloader NOTE: this method provides a convenience of hacking off a leading / should one be present. This is non-standard and it is recommended to not rely on this behavior- Overrides:
getResource
in classWebAppClassLoader
-
loadClass
public java.lang.Class<?> loadClass(java.lang.String name) throws java.lang.ClassNotFoundException
Deprecated.- Overrides:
loadClass
in classjava.lang.ClassLoader
- Throws:
java.lang.ClassNotFoundException
-
clearCache
@ManagedOperation public void clearCache()
Deprecated.
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classWebAppClassLoader
-
-