Package io.milton.http.http11
Class DefaultETagGenerator
java.lang.Object
io.milton.http.http11.DefaultETagGenerator
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionETag's serve to identify a particular version of a particular resource.
-
Constructor Details
-
DefaultETagGenerator
public DefaultETagGenerator()
-
-
Method Details
-
generateEtag
Description copied from interface:ETagGeneratorETag'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:
generateEtagin interfaceETagGenerator- Parameters:
r- - the resource to generate the ETag for- Returns:
- - an ETag which uniquely identifies this version of this resource
-