Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » caching » [javadoc | source]
org.apache.cocoon.caching
public class: CachedResponse [javadoc | source]
java.lang.Object
   org.apache.cocoon.caching.CachedResponse

All Implemented Interfaces:
    Serializable

Direct Known Subclasses:
    CachedSourceResponse

This is a cached response. This can either contain a byte array with the complete character response or a byte array with compiled SAX events. This class replaces the CachedEventObject and the CachedStreamObject.
Field Summary
protected final  SourceValidity[] validityObjects     
protected final  byte[] response     
protected  Long expires     
protected final  long lastModified     
protected  String contentType     
Constructor:
 public CachedResponse(SourceValidity[] validityObjects,
    byte[] response) 
    Create a new entry for the cache.
    Parameters:
    validityObjects - The SourceValidity objects in the order they occured in the pipeline
    response - The cached sax stream or character stream
 public CachedResponse(SourceValidity validityObject,
    byte[] response) 
    Create a new entry for the cache.
    Parameters:
    validityObject - The SourceValidity object
    response - The cached sax stream or character stream
 public CachedResponse(SourceValidity[] validityObjects,
    byte[] response,
    Long expires) 
    Create a new entry for the cache.
    Parameters:
    validityObjects - The SourceValidity objects in the order they occured in the pipeline
    response - The cached sax stream or character stream
    expires - The configured expires, or null if no expires was defined.
Method from org.apache.cocoon.caching.CachedResponse Summary:
getContentType,   getExpires,   getLastModified,   getResponse,   getValidityObjects,   setContentType,   setExpires,   setLastModified
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.caching.CachedResponse Detail:
 public String getContentType() 
 public Long getExpires() 
    Get the configured expires.
 public long getLastModified() 
 public byte[] getResponse() 
    Get the cached response.
 public SourceValidity[] getValidityObjects() 
    Get the validity objects
 public  void setContentType(String value) 
 public  void setExpires(Long newExpires) 
    Set the (newly) configured expires.
 protected long setLastModified(long lastModified) 
    Set the (newly) configured last modified.