ro.isdc.wro.http
Class ConfigurableWroFilter
java.lang.Object
ro.isdc.wro.http.WroFilter
ro.isdc.wro.http.ConfigurableWroFilter
- All Implemented Interfaces:
- javax.servlet.Filter
- Direct Known Subclasses:
- SpringWroFilter
public class ConfigurableWroFilter
- extends WroFilter
An extension of WroFilter
which allows configuration by injecting some of the properties. This class can be
very useful when using DelegatingFilterProxy (spring extension of Filter) and configuring the fields with values from
some properties file which may vary depending on environment.
- Author:
- Alex Objelean
Methods inherited from class ro.isdc.wro.http.WroFilter |
configureDefaultHeaders, destroy, doFilter, doInit, getConfiguration, getMBeanServer, getWroManagerFactory, init, newRequestHandlerFactory, newResponseHeadersConfigurer, onException, onRequestProcessed, onRuntimeException, setConfiguration, setEnable, setRequestHandlerFactory, setResponseHeaders, setWroManagerFactory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigurableWroFilter
public ConfigurableWroFilter()
newWroConfigurationFactory
protected ObjectFactory<WroConfiguration> newWroConfigurationFactory(javax.servlet.FilterConfig filterConfig)
-
- Overrides:
newWroConfigurationFactory
in class WroFilter
- Returns:
- implementation of
ObjectFactory
used to create a WroConfiguration
object.
setDisableCache
public void setDisableCache(boolean disableCache)
- Parameters:
disableCache
- the disableCache to set
newMBeanName
protected String newMBeanName()
-
- Overrides:
newMBeanName
in class WroFilter
- Returns:
- the name of MBean to be used by JMX to configure wro4j.
newWroManagerFactory
protected WroManagerFactory newWroManagerFactory()
- The default implementation of ConfigurableWroFilter should allow setting of pre & post processors in configuration
properties. This will work only if no custom
WroManagerFactory
is configured.
- Overrides:
newWroManagerFactory
in class WroFilter
- Returns:
WroManagerFactory
instance.
setMbeanName
public void setMbeanName(String mbeanName)
- Parameters:
mbeanName
- the mbeanName to set
setJmxEnabled
public void setJmxEnabled(boolean jmxEnabled)
- Parameters:
jmxEnabled
- the jmxEnabled to set
setDebug
public final void setDebug(boolean debug)
- Parameters:
debug
- the debug to set
setGzipEnabled
public final void setGzipEnabled(boolean gzipEnabled)
- Parameters:
gzipEnabled
- the gzipEnabled to set
setCacheUpdatePeriod
public final void setCacheUpdatePeriod(long cacheUpdatePeriod)
- Parameters:
cacheUpdatePeriod
- the cacheUpdatePeriod to set
setModelUpdatePeriod
public final void setModelUpdatePeriod(long modelUpdatePeriod)
- Parameters:
modelUpdatePeriod
- the modelUpdatePeriod to set
setProperties
public void setProperties(Properties properties)
- Parameters:
properties
- the properties to set
getEncoding
public String getEncoding()
- Returns:
- the encoding
setEncoding
public void setEncoding(String encoding)
- Parameters:
encoding
- the encoding to set
Copyright © 2008-2013. All Rights Reserved.