SunONE Application Server v8.0 PE

com.sun.appserv.web.cache.filter
Class HttpCacheEntry

java.lang.Object
  extended bycom.sun.appserv.web.cache.filter.HttpCacheEntry

public class HttpCacheEntry
extends java.lang.Object

HttpCacheEntry Each entry holds cached (HTTP) response: a) response bytes b) response headers c) expiryTime d) parameterEncoding used e) entryKey this entry represents, to match the entry within the hash bucket. XXX: should implement methods to enable serialization of cached response?


Field Summary
static int VALUE_NOT_SET
           
 
Constructor Summary
HttpCacheEntry()
           
 
Method Summary
 void clear()
          clear the contents
 void computeExpireTime(int timeout)
          compute when this entry to be expired based on timeout relative to current time.
 int getSize()
          get the size
 boolean isValid()
          is this response still valid?
 void setExpireTime(long expireTime)
          set the real expire time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALUE_NOT_SET

public static final int VALUE_NOT_SET
See Also:
Constant Field Values
Constructor Detail

HttpCacheEntry

public HttpCacheEntry()
Method Detail

setExpireTime

public void setExpireTime(long expireTime)
set the real expire time

Parameters:
expireTime - in milli seconds

computeExpireTime

public void computeExpireTime(int timeout)
compute when this entry to be expired based on timeout relative to current time.

Parameters:
timeout - in seconds

isValid

public boolean isValid()
is this response still valid?


clear

public void clear()
clear the contents


getSize

public int getSize()
get the size

Returns:
size of this entry in bytes Note: this is only approximate

SunONE Application Server v8.0 PE

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.