org.apache.cocoon.components.source.helpers
Class DelaySourceRefresher
java.lang.Object
org.apache.cocoon.util.AbstractLogEnabled
org.apache.cocoon.components.source.helpers.DelaySourceRefresher
- All Implemented Interfaces:
- Component, SourceRefresher
- public class DelaySourceRefresher
- extends org.apache.cocoon.util.AbstractLogEnabled
- implements SourceRefresher
Default implementation of the refresher.
- Since:
- 2.1.1
- Version:
- $Id: DelaySourceRefresher.html 1304280 2012-03-23 11:18:01Z ilgrosso $
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled |
getLogger, setLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
context
protected Context context
resolver
protected SourceResolver resolver
runnable
protected org.apache.cocoon.thread.RunnableManager runnable
manager
protected ServiceManager manager
settings
protected org.apache.cocoon.configuration.Settings settings
writeInterval
protected long writeInterval
fileName
protected String fileName
entries
protected Map entries
configFile
protected File configFile
- The source to persist refresher entries into
changed
protected volatile boolean changed
configurationTask
protected DelaySourceRefresher.ConfigurationTask configurationTask
DelaySourceRefresher
public DelaySourceRefresher()
init
public void init()
throws ConfigurationException
- Throws:
ConfigurationException
destroy
public void destroy()
refresh
public void refresh(String name,
String uri,
Parameters parameters)
throws SourceException
- Description copied from interface:
SourceRefresher
- Add a uri to the SourceRefresher.
- Specified by:
refresh
in interface SourceRefresher
- Parameters:
name
- Uniquely identifying name for the source.uri
- The uri to refresh. Every valid protocol can be used.parameters
- Additional parameters such as an interval between refresh runs.
- Throws:
SourceException
addRefreshSource
protected void addRefreshSource(String key,
String uri,
long delay,
long interval)
removeRefreshSource
protected void removeRefreshSource(String key)
startConfigurationTask
protected void startConfigurationTask(long interval)
- Parameters:
interval
-
stopConfigurationTask
protected void stopConfigurationTask()
setServiceManager
public void setServiceManager(ServiceManager manager)
setSourceResolver
public void setSourceResolver(SourceResolver resolver)
setRunnableManager
public void setRunnableManager(org.apache.cocoon.thread.RunnableManager runnable)
setSettings
public void setSettings(org.apache.cocoon.configuration.Settings settings)
setWriteFile
public void setWriteFile(String fileName)
setWriteInterval
public void setWriteInterval(long interval)
setAvalonContext
public void setAvalonContext(Context context)
Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.