Class ControlledCacheHttpContent

java.lang.Object
org.eclipse.jetty.http.content.HttpContent.Wrapper
io.deephaven.server.jetty.ControlledCacheHttpContent
All Implemented Interfaces:
org.eclipse.jetty.http.content.HttpContent

public class ControlledCacheHttpContent extends org.eclipse.jetty.http.content.HttpContent.Wrapper
A custom HttpContent implementation for finer control over caching behavior.

  • Calculates a strong ETag based on the content's SHA-256 hash.
  • Overrides all last modified related methods to signal that the content does not have a last modified time. This is needed since we don't use last modified timestamps inside of our .jar files.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.eclipse.jetty.http.content.HttpContent

    org.eclipse.jetty.http.content.HttpContent.Factory, org.eclipse.jetty.http.content.HttpContent.Wrapper
  • Constructor Summary

    Constructors
    Constructor
    Description
    ControlledCacheHttpContent(org.eclipse.jetty.http.content.HttpContent content)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    org.eclipse.jetty.http.HttpField
     
     
     

    Methods inherited from class org.eclipse.jetty.http.content.HttpContent.Wrapper

    getByteBuffer, getBytesOccupied, getCharacterEncoding, getContentEncoding, getContentEncodingValue, getContentLength, getContentLengthValue, getContentType, getContentTypeValue, getETag, getMimeType, getPreCompressedContentFormats, getResource, getWrapped, release, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ControlledCacheHttpContent

      public ControlledCacheHttpContent(org.eclipse.jetty.http.content.HttpContent content) throws IOException
      Throws:
      IOException
  • Method Details

    • getETagValue

      public String getETagValue()
      Specified by:
      getETagValue in interface org.eclipse.jetty.http.content.HttpContent
      Overrides:
      getETagValue in class org.eclipse.jetty.http.content.HttpContent.Wrapper
    • getLastModified

      public org.eclipse.jetty.http.HttpField getLastModified()
      Specified by:
      getLastModified in interface org.eclipse.jetty.http.content.HttpContent
      Overrides:
      getLastModified in class org.eclipse.jetty.http.content.HttpContent.Wrapper
    • getLastModifiedInstant

      public Instant getLastModifiedInstant()
      Specified by:
      getLastModifiedInstant in interface org.eclipse.jetty.http.content.HttpContent
      Overrides:
      getLastModifiedInstant in class org.eclipse.jetty.http.content.HttpContent.Wrapper
    • getLastModifiedValue

      public String getLastModifiedValue()
      Specified by:
      getLastModifiedValue in interface org.eclipse.jetty.http.content.HttpContent
      Overrides:
      getLastModifiedValue in class org.eclipse.jetty.http.content.HttpContent.Wrapper