Class DefaultETagGenerator

java.lang.Object
io.milton.http.http11.DefaultETagGenerator
All Implemented Interfaces:
ETagGenerator

public class DefaultETagGenerator extends Object implements ETagGenerator
Generates the ETag as follows: - if the resource has a null unique id, returns null - if the resource has a modified date it's hashcode is appended to the unique id - the result is returned
Author:
brad
  • Constructor Details

    • DefaultETagGenerator

      public DefaultETagGenerator()
  • Method Details

    • generateEtag

      public String generateEtag(Resource r)
      Description copied from interface: ETagGenerator
      ETag's serve to identify a particular version of a particular resource. If the resource changes, or is replaced, then this value should change
      Specified by:
      generateEtag in interface ETagGenerator
      Parameters:
      r - - the resource to generate the ETag for
      Returns:
      - an ETag which uniquely identifies this version of this resource