Class ControlledCacheResource

java.lang.Object
org.eclipse.jetty.util.resource.Resource
io.deephaven.server.jetty.ControlledCacheResource
All Implemented Interfaces:
Closeable, AutoCloseable, org.eclipse.jetty.util.resource.ResourceFactory

public class ControlledCacheResource extends org.eclipse.jetty.util.resource.Resource
Simple wrapper around the Jetty Resource type, to grant us control over caching features. The current implementation only removes the last-modified value, but a future version could provide a "real" weak/strong etag.
  • Method Details

    • wrap

      public static ControlledCacheResource wrap(org.eclipse.jetty.util.resource.Resource wrapped)
    • isContainedIn

      public boolean isContainedIn(org.eclipse.jetty.util.resource.Resource r) throws MalformedURLException
      Specified by:
      isContainedIn in class org.eclipse.jetty.util.resource.Resource
      Throws:
      MalformedURLException
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in class org.eclipse.jetty.util.resource.Resource
    • exists

      public boolean exists()
      Specified by:
      exists in class org.eclipse.jetty.util.resource.Resource
    • isDirectory

      public boolean isDirectory()
      Specified by:
      isDirectory in class org.eclipse.jetty.util.resource.Resource
    • lastModified

      public long lastModified()
      Specified by:
      lastModified in class org.eclipse.jetty.util.resource.Resource
    • length

      public long length()
      Specified by:
      length in class org.eclipse.jetty.util.resource.Resource
    • getURI

      public URI getURI()
      Specified by:
      getURI in class org.eclipse.jetty.util.resource.Resource
    • getFile

      public File getFile() throws IOException
      Specified by:
      getFile in class org.eclipse.jetty.util.resource.Resource
      Throws:
      IOException
    • getName

      public String getName()
      Specified by:
      getName in class org.eclipse.jetty.util.resource.Resource
    • getInputStream

      public InputStream getInputStream() throws IOException
      Specified by:
      getInputStream in class org.eclipse.jetty.util.resource.Resource
      Throws:
      IOException
    • getReadableByteChannel

      public ReadableByteChannel getReadableByteChannel() throws IOException
      Specified by:
      getReadableByteChannel in class org.eclipse.jetty.util.resource.Resource
      Throws:
      IOException
    • delete

      public boolean delete() throws SecurityException
      Specified by:
      delete in class org.eclipse.jetty.util.resource.Resource
      Throws:
      SecurityException
    • renameTo

      public boolean renameTo(org.eclipse.jetty.util.resource.Resource dest) throws SecurityException
      Specified by:
      renameTo in class org.eclipse.jetty.util.resource.Resource
      Throws:
      SecurityException
    • list

      public String[] list()
      Specified by:
      list in class org.eclipse.jetty.util.resource.Resource
    • addPath

      public org.eclipse.jetty.util.resource.Resource addPath(String path) throws IOException, MalformedURLException
      Specified by:
      addPath in class org.eclipse.jetty.util.resource.Resource
      Throws:
      IOException
      MalformedURLException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object