ro.isdc.wro.config.jmx
Interface WroConfigurationMBean

All Known Implementing Classes:
WroConfiguration

public interface WroConfigurationMBean

This interface defines the MBean which manage the wro4j configuration.

Author:
Alex Objelean

Method Summary
 long getCacheUpdatePeriod()
           
 int getConnectionTimeout()
           
 String getEncoding()
           
 long getModelUpdatePeriod()
           
 long getResourceWatcherUpdatePeriod()
           
 boolean isCacheGzippedContent()
           
 boolean isDebug()
           
 boolean isGzipEnabled()
           
 boolean isIgnoreEmptyGroup()
           
 boolean isIgnoreMissingResources()
           
 void reloadCache()
          Force reload of the cache.
 void reloadModel()
          Force reload of the model.
 void setCacheGzippedContent(boolean cache)
          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 seconds)
          After how many seconds the connection to servlet context and external url will be timed-out.
 void setDebug(boolean debug)
          Set the debug mode.
 void setEncoding(String encoding)
          Encoding to use when writing the processed result into the output stream.
 void setGzipEnabled(boolean enable)
           
 void setIgnoreEmptyGroup(boolean ignore)
           
 void setIgnoreMissingResources(boolean ignore)
           
 void setModelUpdatePeriod(long period)
          Set after how many seconds the wro model should be updated.
 void setResourceWatcherUpdatePeriod(long period)
          Set after how many seconds the resource change detection is performed..
 

Method Detail

getModelUpdatePeriod

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

setModelUpdatePeriod

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

Parameters:
period - number of seconds. Zero or less, means never.

getCacheUpdatePeriod

long getCacheUpdatePeriod()
Returns:
period in seconds when the cache containing merged resources by group should be updated.

setCacheUpdatePeriod

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

Parameters:
period - number of seconds. Zero or less, means never.

getResourceWatcherUpdatePeriod

long getResourceWatcherUpdatePeriod()
Returns:
period in seconds indicating how often resource changes are checked.

setResourceWatcherUpdatePeriod

void setResourceWatcherUpdatePeriod(long period)
Set after how many seconds the resource change detection is performed..

Parameters:
period - number of seconds. Zero or less, means never.

isGzipEnabled

boolean isGzipEnabled()
Returns:
true if Gzip is Enabled.

setGzipEnabled

void setGzipEnabled(boolean enable)
Parameters:
enable - if true, gzip will be enabled, otherwise will be disabled.

isDebug

boolean isDebug()
Returns:
the state of debug flag.

setDebug

void setDebug(boolean debug)
Set the debug mode.

Parameters:
debug - if true, the wro4j will run in DEVELOPMENT MODE.

reloadCache

void reloadCache()
Force reload of the cache.


reloadModel

void reloadModel()
Force reload of the model.


setConnectionTimeout

void setConnectionTimeout(int seconds)
After how many seconds the connection to servlet context and external url will be timed-out. This is useful to avoid memory leaks when connection pool responsible for cache and model reload is destroyed.

Parameters:
seconds - value in seconds.

getConnectionTimeout

int getConnectionTimeout()
Returns:
the number of seconds to wait until connection will timeout.

setCacheGzippedContent

void setCacheGzippedContent(boolean cache)
Whether gzipped content should be cached or not. In order to take effect, after changing this value, reload the cache.

Parameters:
cache - boolean flag.

isCacheGzippedContent

boolean isCacheGzippedContent()
Returns:
true if the cacheGzippedContent flag is enabled.

setEncoding

void setEncoding(String encoding)
Encoding to use when writing the processed result into the output stream.

Parameters:
encoding - name of the charset encoding to set.

getEncoding

String getEncoding()
Returns:
currently used encoding.

isIgnoreMissingResources

boolean isIgnoreMissingResources()
Returns:
if missing resources should be ignored.

setIgnoreMissingResources

void setIgnoreMissingResources(boolean ignore)

setIgnoreEmptyGroup

void setIgnoreEmptyGroup(boolean ignore)
Parameters:
ignore - turns on/off failure on empty group (when there is nothing to process).

isIgnoreEmptyGroup

boolean isIgnoreEmptyGroup()
Returns:
value of the flag responsible for handling empty group behavior.


Copyright © 2008-2013. All Rights Reserved.