com.bradmcevoy.http.http11
Class DefaultETagGenerator

java.lang.Object
  extended by com.bradmcevoy.http.http11.DefaultETagGenerator
All Implemented Interfaces:
ETagGenerator

public class DefaultETagGenerator
extends java.lang.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 Summary
DefaultETagGenerator()
           
 
Method Summary
 java.lang.String generateEtag(Resource r)
          ETag's serve to identify a particular version of a particular resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultETagGenerator

public DefaultETagGenerator()
Method Detail

generateEtag

public java.lang.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


Copyright © 2011. All Rights Reserved.