rewrite-impl-servlet 2.0.0.Beta2

org.ocpsoft.rewrite.servlet.impl
Class ServletContextConfigurationCacheProvider

java.lang.Object
  extended by org.ocpsoft.rewrite.servlet.config.HttpConfigurationCacheProvider
      extended by org.ocpsoft.rewrite.servlet.impl.ServletContextConfigurationCacheProvider
All Implemented Interfaces:
org.ocpsoft.common.pattern.Specialized<Object>, org.ocpsoft.common.pattern.Weighted, ConfigurationCacheProvider<ServletContext>

public class ServletContextConfigurationCacheProvider
extends HttpConfigurationCacheProvider

Default implementation of ConfigurationCacheProvider that uses the ServletContext as an application-scoped storage medium. By default, the Configuration will be loaded once upon application startup, and never again.

To disable the default caching mechanism, and enable Configuration reloading on each request, add the following servlet context init parameter to web.xml:

 <context-param>
   <param-name>org.ocpsoft.rewrite.config.CONFIG_RELOADING</param-name>
   <param-value>false</param-value>
 </context-param>
 

Author:
Lincoln Baxter, III

Constructor Summary
ServletContextConfigurationCacheProvider()
           
 
Method Summary
 Configuration getConfiguration(ServletContext context)
           
 int priority()
           
 void setConfiguration(ServletContext context, Configuration configuration)
           
 
Methods inherited from class org.ocpsoft.rewrite.servlet.config.HttpConfigurationCacheProvider
handles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletContextConfigurationCacheProvider

public ServletContextConfigurationCacheProvider()
Method Detail

getConfiguration

public Configuration getConfiguration(ServletContext context)

setConfiguration

public void setConfiguration(ServletContext context,
                             Configuration configuration)

priority

public int priority()

rewrite-impl-servlet 2.0.0.Beta2

Copyright © 2013 OCPsoft. All Rights Reserved.