org.apache.cocoon.caching
Class ExtendedCachedResponse

java.lang.Object
  extended byorg.apache.cocoon.caching.CachedResponse
      extended byorg.apache.cocoon.caching.ExtendedCachedResponse
All Implemented Interfaces:
Serializable

public class ExtendedCachedResponse
extends CachedResponse

This is a cached response. It extends the CachedResponse by a second array that could contain an alternative response.

Since:
2.1.1
Version:
CVS $Id: ExtendedCachedResponse.java 30941 2004-07-29 19:56:58Z vgritsenko $
Author:
Carsten Ziegeler
See Also:
Serialized Form

Field Summary
protected  byte[] alternativeResponse
           
 
Fields inherited from class org.apache.cocoon.caching.CachedResponse
contentType, expires, lastModified, response, validityObjects
 
Constructor Summary
ExtendedCachedResponse(SourceValidity[] validityObjects, byte[] response)
          Create a new entry for the cache.
ExtendedCachedResponse(SourceValidity[] validityObjects, byte[] response, Long expires)
          Create a new entry for the cache.
ExtendedCachedResponse(SourceValidity validityObject, byte[] response)
          Create a new entry for the cache.
 
Method Summary
 byte[] getAlternativeResponse()
           
 void setAlternativeResponse(byte[] response)
           
 
Methods inherited from class org.apache.cocoon.caching.CachedResponse
getContentType, getExpires, getLastModified, getResponse, getValidityObjects, setContentType, setExpires, setLastModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alternativeResponse

protected byte[] alternativeResponse
Constructor Detail

ExtendedCachedResponse

public ExtendedCachedResponse(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

ExtendedCachedResponse

public ExtendedCachedResponse(SourceValidity validityObject,
                              byte[] response)
Create a new entry for the cache.

Parameters:
validityObject - The SourceValidity object
response - The cached sax stream or character stream

ExtendedCachedResponse

public ExtendedCachedResponse(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 Detail

getAlternativeResponse

public byte[] getAlternativeResponse()
Returns:
The alternative response

setAlternativeResponse

public void setAlternativeResponse(byte[] response)
Parameters:
response - Set the alternative response


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.