info.magnolia.module.cache.filter
Class CachedRedirect
java.lang.Object
info.magnolia.module.cache.filter.CachedRedirect
- All Implemented Interfaces:
- CachedEntry, java.io.Serializable
public class CachedRedirect
- extends java.lang.Object
- implements CachedEntry, java.io.Serializable
Cached redirect contract providing access to the status code and target location.
- Version:
- $Revision: $ ($Author: $)
- Author:
- gjoseph
- See Also:
- Serialized Form
Constructor Summary |
CachedRedirect(int statusCode,
java.lang.String location,
java.lang.String originalUrl)
|
Method Summary |
long |
getLastModificationTime()
Produce last modification date of the cache entry. |
java.lang.String |
getLocation()
|
java.lang.String |
getOriginalURL()
Entry might be required to produce url used to create it in the first place. |
int |
getStatusCode()
|
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 |
CachedRedirect
public CachedRedirect(int statusCode,
java.lang.String location,
java.lang.String originalUrl)
getStatusCode
public int getStatusCode()
getLocation
public java.lang.String getLocation()
replay
public void replay(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain)
throws java.io.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:
java.io.IOException
javax.servlet.ServletException
getOriginalURL
public java.lang.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.
Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.