org.codehaus.httpcache4j.cache
Class DefaultCacheItem
java.lang.Object
org.codehaus.httpcache4j.cache.DefaultCacheItem
- All Implemented Interfaces:
- CacheItem
public class DefaultCacheItem
- extends Object
- implements CacheItem
This is an internal class, and should not be used by clients.
- Author:
- Erlend Hamnaberg
cachedTime
protected org.joda.time.DateTime cachedTime
response
protected HTTPResponse response
ttl
protected int ttl
DefaultCacheItem
public DefaultCacheItem(HTTPResponse response)
DefaultCacheItem
public DefaultCacheItem(HTTPResponse response,
org.joda.time.DateTime cachedTime)
getTTL
public int getTTL()
- Specified by:
getTTL in interface CacheItem
isStale
public boolean isStale(HTTPRequest request)
- Specified by:
isStale in interface CacheItem
getAge
public int getAge(HTTPRequest request)
- Specified by:
getAge in interface CacheItem
getTTL
public static int getTTL(HTTPResponse response,
int defaultTTLinSeconds)
getCachedTime
public org.joda.time.DateTime getCachedTime()
- Specified by:
getCachedTime in interface CacheItem
getResponse
public HTTPResponse getResponse()
- Specified by:
getResponse in interface CacheItem
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
Copyright © 2008-2011. All Rights Reserved.