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.
- since:
2.1 -
- author:
< - a href="mailto:cziegeler@apache.org">Carsten Ziegeler
- version:
CVS - $Id: CachedResponse.java 433543 2006-08-22 06:22:54Z crossley $
| 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) {
this(validityObjects, response, null);
}
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) {
this(new SourceValidity[] {validityObject}, response, null);
}
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) {
this.validityObjects = validityObjects;
this.response = response;
this.expires = expires;
this.lastModified = this.setLastModified(System.currentTimeMillis());
}
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.
|