org.opennms.netmgt.dao.castor
Class AbstractCastorConfigDao<K,V>

java.lang.Object
  extended by org.opennms.netmgt.dao.castor.AbstractCastorConfigDao<K,V>
Type Parameters:
K - Castor class
V - Configuration object that is stored in memory (might be the same as the Castor class or could be a different class)
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
DefaultAckdConfigurationDao, DefaultJavamailConfigurationDao, DefaultStatisticsDaemonConfigDao, DefaultSurveillanceViewConfigDao, DefaultTl1ConfigurationDao

public abstract class AbstractCastorConfigDao<K,V>
extends Object
implements org.springframework.beans.factory.InitializingBean

Author:
DJ Gregor

Nested Class Summary
 class AbstractCastorConfigDao.CastorReloadCallback
           
 
Constructor Summary
AbstractCastorConfigDao(Class<K> entityClass, String description)
           
 
Method Summary
 void afterPropertiesSet()
           
protected  String createLoadedLogMessage(V translatedConfig, long diffTime)
           
 org.springframework.core.io.Resource getConfigResource()
           
protected  FileReloadContainer<V> getContainer()
           
 String getDescription()
           
 Long getReloadCheckInterval()
           
protected  V loadConfig(org.springframework.core.io.Resource resource)
           
protected  Category log()
           
 void setConfigResource(org.springframework.core.io.Resource configResource)
           
 void setReloadCheckInterval(Long reloadCheckInterval)
           
abstract  V translateConfig(K castorConfig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCastorConfigDao

public AbstractCastorConfigDao(Class<K> entityClass,
                               String description)
Method Detail

translateConfig

public abstract V translateConfig(K castorConfig)

log

protected Category log()

loadConfig

protected V loadConfig(org.springframework.core.io.Resource resource)

createLoadedLogMessage

protected String createLoadedLogMessage(V translatedConfig,
                                        long diffTime)

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean

getConfigResource

public org.springframework.core.io.Resource getConfigResource()

setConfigResource

public void setConfigResource(org.springframework.core.io.Resource configResource)

getContainer

protected FileReloadContainer<V> getContainer()

getReloadCheckInterval

public Long getReloadCheckInterval()

setReloadCheckInterval

public void setReloadCheckInterval(Long reloadCheckInterval)

getDescription

public String getDescription()


Copyright © 2009. All Rights Reserved.