Class 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 caches getResource(String) results. Specifically this ClassLoader caches not found classes and resources, which can greatly increase performance for applications that search for resources.
    • 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 class WebAppClassLoader
      • loadClass

        public java.lang.Class<?> loadClass​(java.lang.String name)
                                     throws java.lang.ClassNotFoundException
        Deprecated.
        Overrides:
        loadClass in class java.lang.ClassLoader
        Throws:
        java.lang.ClassNotFoundException