de.neteye.actioncache
Class ActionCachePlugIn

java.lang.Object
  |
  +--de.neteye.actioncache.ActionCachePlugIn
All Implemented Interfaces:
org.apache.struts.action.PlugIn

public class ActionCachePlugIn
extends java.lang.Object
implements org.apache.struts.action.PlugIn

Since:
1.1
Version:
$Revision: 1.4 $
Author:
Felix Gnass

Field Summary
static java.lang.String CACHE
           
 
Constructor Summary
ActionCachePlugIn()
           
 
Method Summary
 void destroy()
          Persists the cache on shutdown.
 void init(org.apache.struts.action.ActionServlet servlet, org.apache.struts.config.ModuleConfig config)
          Initializes the cache.
 void setCacheDir(java.lang.String cacheDir)
          Sets the absolute path to the directory where the cached content is stored.
 void setCapacity(int capacity)
          Sets the maximum number of elements that will be cached.
 void setContextRelative(boolean contextRelative)
          Sets whether the cacheDir should be resolved relative to the servlet context.
 void setProcessorClass(java.lang.String className)
          Applications that need to use a custom RequestProcessor can specify the implementing class here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE

public static final java.lang.String CACHE
See Also:
Constant Field Values
Constructor Detail

ActionCachePlugIn

public ActionCachePlugIn()
Method Detail

setCapacity

public void setCapacity(int capacity)
Sets the maximum number of elements that will be cached.


setCacheDir

public void setCacheDir(java.lang.String cacheDir)
Sets the absolute path to the directory where the cached content is stored.


setContextRelative

public void setContextRelative(boolean contextRelative)
Sets whether the cacheDir should be resolved relative to the servlet context.


setProcessorClass

public void setProcessorClass(java.lang.String className)
Applications that need to use a custom RequestProcessor can specify the implementing class here. An example for an alternative processor is the de.neteye.actioncache.TilesCacheRequestProcessor that supports Tiles.


init

public void init(org.apache.struts.action.ActionServlet servlet,
                 org.apache.struts.config.ModuleConfig config)
          throws javax.servlet.ServletException
Initializes the cache.

Specified by:
init in interface org.apache.struts.action.PlugIn
javax.servlet.ServletException

destroy

public void destroy()
Persists the cache on shutdown.

Specified by:
destroy in interface org.apache.struts.action.PlugIn