org.omnifaces.component.output.cache
Class CacheInitializerListener

java.lang.Object
  extended by org.omnifaces.component.output.cache.CacheInitializerListener
All Implemented Interfaces:
java.util.EventListener, javax.servlet.ServletContextListener

@WebListener
public class CacheInitializerListener
extends java.lang.Object
implements javax.servlet.ServletContextListener

Optional initializer for the Cache used by the Omnifaces Cache component.

It takes a configuration from web.xml context parameters and used that to set a cache provider and/or configure the caching provider. If no initialization is done defaults are used.

Since:
1.1
Author:
Arjan Tijms

Field Summary
static java.lang.String CACHE_INSTALL_BUFFER_FILTER
           
static java.lang.String CACHE_PROVIDER_INIT_PARAM_NAME
           
static java.lang.String CACHE_PROVIDER_SETTING_INIT_PARAM_PREFIX
           
 
Constructor Summary
CacheInitializerListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent sce)
           
 void contextInitialized(javax.servlet.ServletContextEvent sce)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE_PROVIDER_INIT_PARAM_NAME

public static final java.lang.String CACHE_PROVIDER_INIT_PARAM_NAME
See Also:
Constant Field Values

CACHE_INSTALL_BUFFER_FILTER

public static final java.lang.String CACHE_INSTALL_BUFFER_FILTER
See Also:
Constant Field Values

CACHE_PROVIDER_SETTING_INIT_PARAM_PREFIX

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

CacheInitializerListener

public CacheInitializerListener()
Method Detail

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent sce)
Specified by:
contextInitialized in interface javax.servlet.ServletContextListener

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent sce)
Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener