ro.isdc.wro.config.jmx
Class WroConfiguration

java.lang.Object
  extended by ro.isdc.wro.config.jmx.WroConfiguration
All Implemented Interfaces:
WroConfigurationMBean

public final class WroConfiguration
extends Object
implements WroConfigurationMBean

Author:
Admin

Constructor Summary
WroConfiguration()
           
 
Method Summary
 void destroy()
          Perform the cleanup, clear the listeners.
 long getCacheUpdatePeriod()
          
 int getConnectionTimeout()
           
 String getEncoding()
           
 String getHeader()
           
 String getMbeanName()
           
 long getModelUpdatePeriod()
          
static String getObjectName()
           
 String getWroManagerClassName()
           
 boolean isCacheGzippedContent()
           
 boolean isDebug()
           
 boolean isDisableCache()
           
 boolean isGzipEnabled()
          
 boolean isIgnoreMissingResources()
           
 boolean isJmxEnabled()
           
 boolean isParallelPreprocessing()
           
 void registerCacheUpdatePeriodChangeListener(PropertyChangeListener listener)
          Register a listener which is notified when the modelUpdate period value is changed.
 void registerModelUpdatePeriodChangeListener(PropertyChangeListener listener)
          Register a listener which is notified when the modelUpdate period value is changed.
 void reloadCache()
          Force reload of the cache.
 void reloadModel()
          Force reload of the model.
 void setCacheGzippedContent(boolean cacheGzippedContent)
          Whether gzipped content should be cached or not.
 void setCacheUpdatePeriod(long period)
          Set after how many seconds the cache containing merged resources by group name should be updated.
 void setConnectionTimeout(int connectionTimeout)
          Timeout (seconds) of the url connection for external resources.
 void setDebug(boolean debug)
          Set the debug mode.
 void setDisableCache(boolean disableCache)
           
 void setEncoding(String encoding)
          Encoding to use when writing the processed result into the output stream.
 void setGzipEnabled(boolean enable)
          
 void setHeader(String header)
           
 void setIgnoreMissingResources(boolean ignoreMissingResources)
           
 void setJmxEnabled(boolean jmxEnabled)
           
 void setMbeanName(String mbeanName)
           
 void setModelUpdatePeriod(long period)
          Set after how many seconds the wro model should be updated.
 void setParallelPreprocessing(boolean parallelPreprocessing)
           
 void setWroManagerClassName(String wroManagerClassName)
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WroConfiguration

public WroConfiguration()
Method Detail

getObjectName

public static String getObjectName()
Returns:
the name of the object used to register the MBean.

getCacheUpdatePeriod

public long getCacheUpdatePeriod()

Specified by:
getCacheUpdatePeriod in interface WroConfigurationMBean
Returns:
period in seconds when the cache containing merged resources by group should be updated.

getModelUpdatePeriod

public long getModelUpdatePeriod()

Specified by:
getModelUpdatePeriod in interface WroConfigurationMBean
Returns:
period in seconds when the wro model (by default read from wro.xml) is updated.

setCacheUpdatePeriod

public void setCacheUpdatePeriod(long period)
Set after how many seconds the cache containing merged resources by group name should be updated.

Specified by:
setCacheUpdatePeriod in interface WroConfigurationMBean
Parameters:
period - number of seconds. Zero or less, means never.

setModelUpdatePeriod

public void setModelUpdatePeriod(long period)
Set after how many seconds the wro model should be updated.

Specified by:
setModelUpdatePeriod in interface WroConfigurationMBean
Parameters:
period - number of seconds. Zero or less, means never.

isGzipEnabled

public boolean isGzipEnabled()

Specified by:
isGzipEnabled in interface WroConfigurationMBean
Returns:
true if Gzip is Enabled.

setGzipEnabled

public void setGzipEnabled(boolean enable)

Specified by:
setGzipEnabled in interface WroConfigurationMBean
Parameters:
enable - if true, gzip will be enabled, otherwise will be disabled.

reloadCache

public void reloadCache()
Force reload of the cache.

Specified by:
reloadCache in interface WroConfigurationMBean

reloadModel

public void reloadModel()
Force reload of the model.

Specified by:
reloadModel in interface WroConfigurationMBean

registerModelUpdatePeriodChangeListener

public void registerModelUpdatePeriodChangeListener(PropertyChangeListener listener)
Register a listener which is notified when the modelUpdate period value is changed. Registration is allowed only during

Parameters:
listener - to add.

registerCacheUpdatePeriodChangeListener

public void registerCacheUpdatePeriodChangeListener(PropertyChangeListener listener)
Register a listener which is notified when the modelUpdate period value is changed.

Parameters:
listener - to add.

isDebug

public boolean isDebug()
Specified by:
isDebug in interface WroConfigurationMBean
Returns:
the debug

setDebug

public void setDebug(boolean debug)
Description copied from interface: WroConfigurationMBean
Set the debug mode.

Specified by:
setDebug in interface WroConfigurationMBean
Parameters:
debug - the debug to set

isIgnoreMissingResources

public boolean isIgnoreMissingResources()
Specified by:
isIgnoreMissingResources in interface WroConfigurationMBean
Returns:
the ignoreMissingResources

setIgnoreMissingResources

public void setIgnoreMissingResources(boolean ignoreMissingResources)
Specified by:
setIgnoreMissingResources in interface WroConfigurationMBean
Parameters:
ignoreMissingResources - the ignoreMissingResources to set

isDisableCache

public boolean isDisableCache()
Returns:
the disableCache

setDisableCache

public void setDisableCache(boolean disableCache)
Parameters:
disableCache - the disableCache to set

isJmxEnabled

public boolean isJmxEnabled()
Returns:
the jmxEnabled

setJmxEnabled

public void setJmxEnabled(boolean jmxEnabled)
Parameters:
jmxEnabled - the jmxEnabled to set

isCacheGzippedContent

public boolean isCacheGzippedContent()
Specified by:
isCacheGzippedContent in interface WroConfigurationMBean
Returns:
the cacheGzippedContent

setCacheGzippedContent

public void setCacheGzippedContent(boolean cacheGzippedContent)
Description copied from interface: WroConfigurationMBean
Whether gzipped content should be cached or not. In order to take effect, after changing this value, reload the cache.

Specified by:
setCacheGzippedContent in interface WroConfigurationMBean
Parameters:
cacheGzippedContent - the cacheGzippedContent to set

destroy

public void destroy()
Perform the cleanup, clear the listeners.


getEncoding

public String getEncoding()
Specified by:
getEncoding in interface WroConfigurationMBean
Returns:
the encoding

setEncoding

public void setEncoding(String encoding)
Description copied from interface: WroConfigurationMBean
Encoding to use when writing the processed result into the output stream.

Specified by:
setEncoding in interface WroConfigurationMBean
Parameters:
encoding - the encoding to set

getWroManagerClassName

public String getWroManagerClassName()
Returns:
the wroManagerClassName

setWroManagerClassName

public void setWroManagerClassName(String wroManagerClassName)
Parameters:
wroManagerClassName - the wroManagerClassName to set

getMbeanName

public String getMbeanName()
Returns:
the mbeanName

setMbeanName

public void setMbeanName(String mbeanName)
Parameters:
mbeanName - the mbeanName to set

getHeader

public String getHeader()
Returns:
the header

setHeader

public void setHeader(String header)
Parameters:
header - the header to set

getConnectionTimeout

public int getConnectionTimeout()
Specified by:
getConnectionTimeout in interface WroConfigurationMBean
Returns:
the connectionTimeout

setConnectionTimeout

public void setConnectionTimeout(int connectionTimeout)
Timeout (seconds) of the url connection for external resources. This is used to ensure that locator doesn't spend too much time on slow end-point.

Specified by:
setConnectionTimeout in interface WroConfigurationMBean
Parameters:
connectionTimeout - the connectionTimeout to set

isParallelPreprocessing

public boolean isParallelPreprocessing()
Returns:
the parallelPreprocessing

setParallelPreprocessing

public void setParallelPreprocessing(boolean parallelPreprocessing)
Parameters:
parallelPreprocessing - the parallelPreprocessing to set

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2008-2011. All Rights Reserved.