Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.roller.presentation.pagecache
Class PageCache  view PageCache download PageCache.java

java.lang.Object
  extended byorg.roller.presentation.pagecache.PageCache
All Implemented Interfaces:
javax.servlet.Filter

public class PageCache
extends java.lang.Object
implements javax.servlet.Filter

Configurable PageCache Filter implementation. Set the desired FilterHandler by adding a filter init parameter to web.xml named 'handler'. Possible values:

OSCacheFilterHandler: to use OSCache (the default)
CommonsPageCache: to use the Jakarta Commons cache


Field Summary
private  FilterHandler mHandler
           
private static java.util.ArrayList mHandlers
           
private static org.apache.commons.logging.Log mLogger
           
 
Constructor Summary
PageCache()
           
 
Method Summary
 void destroy()
          Filter clean-up
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
          Process the doFilter
static void flushCache(javax.servlet.http.HttpServletRequest req)
          Flush cache for all handlers of this class
 void init(javax.servlet.FilterConfig filterConfig)
          Initialize the filter.
static void removeFromCache(javax.servlet.http.HttpServletRequest req, org.roller.pojos.UserData user)
          Remove from cache for all handlers of this class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mLogger

private static org.apache.commons.logging.Log mLogger

mHandler

private FilterHandler mHandler

mHandlers

private static java.util.ArrayList mHandlers
Constructor Detail

PageCache

public PageCache()
Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig)
Initialize the filter.

Specified by:
init in interface javax.servlet.Filter

destroy

public void destroy()
Filter clean-up

Specified by:
destroy in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain chain)
              throws javax.servlet.ServletException,
                     java.io.IOException
Process the doFilter

Specified by:
doFilter in interface javax.servlet.Filter

flushCache

public static void flushCache(javax.servlet.http.HttpServletRequest req)
Flush cache for all handlers of this class


removeFromCache

public static void removeFromCache(javax.servlet.http.HttpServletRequest req,
                                   org.roller.pojos.UserData user)
Remove from cache for all handlers of this class