info.magnolia.module.cache.filter
Class CachedError

java.lang.Object
  extended by info.magnolia.module.cache.filter.CachedError
All Implemented Interfaces:
CachedEntry, Serializable

public class CachedError
extends Object
implements CachedEntry, Serializable

Contract for cached errors providing access to the error codes.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph
See Also:
Serialized Form

Constructor Summary
CachedError(int statusCode, String originalUrl, int timeToLiveInSeconds)
           
 
Method Summary
 long getLastModificationTime()
          Produce last modification date of the cache entry.
 String getOriginalURL()
          Entry might be required to produce url used to create it in the first place.
 int getStatusCode()
           
 int getTimeToLiveInSeconds()
           
 void replay(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedError

public CachedError(int statusCode,
                   String originalUrl,
                   int timeToLiveInSeconds)
Method Detail

getStatusCode

public int getStatusCode()

replay

public void replay(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response,
                   javax.servlet.FilterChain chain)
            throws IOException,
                   javax.servlet.ServletException
Specified by:
replay in interface CachedEntry
chain - a cache entry might want to delegate to the filter chain, see DelegatingBlobCachedEntry.replay(HttpServletRequest, HttpServletResponse, FilterChain)
Throws:
IOException
javax.servlet.ServletException

getOriginalURL

public String getOriginalURL()
Description copied from interface: CachedEntry
Entry might be required to produce url used to create it in the first place.

Specified by:
getOriginalURL in interface CachedEntry
Returns:
URL that triggered cache entry creation.

getLastModificationTime

public long getLastModificationTime()
Description copied from interface: CachedEntry
Produce last modification date of the cache entry. If no other time can be discerned, the time of entry creation should be returned.

Specified by:
getLastModificationTime in interface CachedEntry
Returns:
time when cached entry was last modified. This time should reflect real modification time of the cached content.

getTimeToLiveInSeconds

public int getTimeToLiveInSeconds()
Specified by:
getTimeToLiveInSeconds in interface CachedEntry


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.