Class ETagInterceptor


  • public class ETagInterceptor
    extends java.lang.Object
    Etag interceptor to enable If-None-Match request with ETAG support. If the ETag generated for each request matches the value in the If-None-Match header, an empty response with status code 304 (not modified) is sent to the client.
    Since:
    6.9.4
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String generateETagToken​(Translet translet, boolean isWeak)  
      void intercept​(Translet translet)  
      boolean isWriteWeakETag()
      Return whether the ETag value written to the response should be weak, as per RFC 7232.
      void setWriteWeakETag​(boolean writeWeakETag)
      Set whether the ETag value written to the response should be weak, as per RFC 7232.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setWriteWeakETag

        public void setWriteWeakETag​(boolean writeWeakETag)
        Set whether the ETag value written to the response should be weak, as per RFC 7232.
        See Also:
        RFC 7232 section 2.3
      • isWriteWeakETag

        public boolean isWriteWeakETag()
        Return whether the ETag value written to the response should be weak, as per RFC 7232.
      • intercept

        public void intercept​(Translet translet)
      • generateETagToken

        protected java.lang.String generateETagToken​(Translet translet,
                                                     boolean isWeak)