com.bradmcevoy.http.http11
Interface ETagGenerator
- All Known Subinterfaces:
- Http11ResponseHandler, WebDavResponseHandler
- All Known Implementing Classes:
- AbstractWrappingResponseHandler, CompressingResponseHandler, DefaultETagGenerator, DefaultHttp11ResponseHandler, DefaultWebDavResponseHandler, MsOfficeResponseHandler
public interface ETagGenerator
Generates ETags, ie entity tags.
Custom implementations must be injected into:
- DefaultHttp11ResponseHandler
- DefaultWebDavPropertySource
.. or whatever you're using in their place
Note that the Http11ResponseHandler interface extends this, since it response
handlers logically must know how to generate etags (or that they shouldnt be
generated) and it assists with wrapping to expose that functionality, without
exposing the dependency directly.
HTTP/1.1 origin servers:
- SHOULD send an entity tag validator unless it is not feasible to
generate one.
- MAY send a weak entity tag instead of a strong entity tag, if
performance considerations support the use of weak entity tags,
or if it is unfeasible to send a strong entity tag.
- SHOULD send a Last-Modified value if it is feasible to send one,
unless the risk of a breakdown in semantic transparency that
could result from using this date in an If-Modified-Since header
would lead to serious problems.
- Author:
- brad
|
Method Summary |
java.lang.String |
generateEtag(Resource r)
ETag's serve to identify a particular version of a particular resource. |
generateEtag
java.lang.String generateEtag(Resource r)
- ETag's serve to identify a particular version of a particular resource.
If the resource changes, or is replaced, then this value should change
- Parameters:
r - - the resource to generate the ETag for
- Returns:
- - an ETag which uniquely identifies this version of this resource
Copyright © 2011. All Rights Reserved.