info.magnolia.module.cache.filter
Class DelegatingBlobCachedEntry

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

public class DelegatingBlobCachedEntry
extends ContentCachedEntry

Used for big files. The content will be served from the repository rather than by storing in the cache entry.

Version:
$Id$
Author:
pbaerfuss
See Also:
Serialized Form

Constructor Summary
DelegatingBlobCachedEntry(long contentLength, String contentType, String characterEncoding, int statusCode, org.apache.commons.collections.MultiMap headers, long modificationDate)
           
 
Method Summary
 void bindContentFileToCurrentRequest(javax.servlet.http.HttpServletRequest request, File contentFile)
           
protected  boolean canServeGzipContent()
           
 void replay(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain)
           
protected  void writeContent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain, boolean acceptsGzipEncoding)
           
 
Methods inherited from class info.magnolia.module.cache.filter.ContentCachedEntry
addHeaders, getCharacterEncoding, getContentType, getHeaders, getLastModificationTime, getStatusCode, isAcceptsGzip, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DelegatingBlobCachedEntry

public DelegatingBlobCachedEntry(long contentLength,
                                 String contentType,
                                 String characterEncoding,
                                 int statusCode,
                                 org.apache.commons.collections.MultiMap headers,
                                 long modificationDate)
                          throws IOException
Throws:
IOException
Method Detail

canServeGzipContent

protected boolean canServeGzipContent()
Specified by:
canServeGzipContent in class ContentCachedEntry

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
Overrides:
replay in class ContentCachedEntry
chain - a cache entry might want to delegate to the filter chain, see replay(HttpServletRequest, HttpServletResponse, FilterChain)
Throws:
IOException
javax.servlet.ServletException

writeContent

protected void writeContent(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response,
                            javax.servlet.FilterChain chain,
                            boolean acceptsGzipEncoding)
                     throws IOException,
                            javax.servlet.ServletException
Specified by:
writeContent in class ContentCachedEntry
Throws:
IOException
javax.servlet.ServletException

bindContentFileToCurrentRequest

public void bindContentFileToCurrentRequest(javax.servlet.http.HttpServletRequest request,
                                            File contentFile)


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