Package org.opennms.core.xml
Class AbstractJaxbConfigDao<K,V>
- java.lang.Object
-
- org.opennms.core.xml.AbstractJaxbConfigDao<K,V>
-
- Type Parameters:
K- JAXB classV- Configuration object that is stored in memory (might be the same as the JAXB class or could be a different class)
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
AbstractWritableJaxbConfigDao,BSFNorthbounderConfigDao,DefaultAckdConfigurationDao,DefaultDatabaseReportConfigDao,DefaultDataCollectionConfigDao,DefaultJavamailConfigurationDao,DefaultMicroblogConfigurationDao,DefaultOnmsReportConfigDao,DefaultProvisiondConfigurationDao,DefaultReportdConfigurationDao,DefaultSnmpHwInventoryAdapterConfigDao,DefaultStatisticsDaemonConfigDao,DefaultSurveillanceViewConfigDao,DefaultTl1ConfigurationDao,DroolsNorthbounderConfigDao,EmailNorthbounderConfigDao,GeoIpConfigDao,JdbcDataCollectionConfigDaoJaxb,JmsNorthbounderConfigDao,JmxConfigDaoJaxb,SnmpMetadataConfigDao,SnmpTrapNorthbounderConfigDao,SyslogNorthbounderConfigDao,TcaDataCollectionConfigDaoJaxb,TelemetrydConfigDao,VmwareCimDatacollectionConfigDaoJaxb,VmwareConfigDaoJaxb,VmwareDatacollectionConfigDaoJaxb,WSManConfigDaoJaxb,XmlDataCollectionConfigDaoJaxb
public abstract class AbstractJaxbConfigDao<K,V> extends Object implements org.springframework.beans.factory.InitializingBean
Abstract AbstractJaxbConfigDao class.
- Version:
- $Id: $
- Author:
- DJ Gregor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classAbstractJaxbConfigDao.JaxbReloadCallback
-
Constructor Summary
Constructors Constructor Description AbstractJaxbConfigDao(Class<K> entityClass, String description)Constructor for AbstractJaxbConfigDao.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddOnReloadedCallback(java.util.function.Consumer<V> callback)voidafterPropertiesSet()afterPropertiesSetorg.springframework.core.io.ResourcegetConfigResource()getConfigResourceFileReloadContainer<V>getContainer()getContainerStringgetDescription()getDescriptionLonggetReloadCheckInterval()getReloadCheckIntervalprotected VloadConfig(org.springframework.core.io.Resource resource)loadConfigvoidsetConfigResource(org.springframework.core.io.Resource configResource)setConfigResourcevoidsetReloadCheckInterval(Long reloadCheckInterval)setReloadCheckIntervalprotected abstract VtranslateConfig(K config)translateConfig
-
-
-
Method Detail
-
translateConfig
protected abstract V translateConfig(K config)
translateConfig
- Parameters:
config- a K object.- Returns:
- a V object.
-
loadConfig
protected V loadConfig(org.springframework.core.io.Resource resource)
loadConfig
- Parameters:
resource- aResourceobject.- Returns:
- a V object.
-
afterPropertiesSet
public void afterPropertiesSet()
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
getConfigResource
public org.springframework.core.io.Resource getConfigResource()
getConfigResource
- Returns:
- a
Resourceobject.
-
setConfigResource
public void setConfigResource(org.springframework.core.io.Resource configResource)
setConfigResource
- Parameters:
configResource- aResourceobject.
-
getContainer
public FileReloadContainer<V> getContainer()
getContainer
- Returns:
- a
FileReloadContainerobject.
-
getReloadCheckInterval
public Long getReloadCheckInterval()
getReloadCheckInterval
- Returns:
- a
Longobject.
-
setReloadCheckInterval
public void setReloadCheckInterval(Long reloadCheckInterval)
setReloadCheckInterval
- Parameters:
reloadCheckInterval- aLongobject.
-
addOnReloadedCallback
public void addOnReloadedCallback(java.util.function.Consumer<V> callback)
- Parameters:
callback- a callback that will be called when the entity maintained by this DAO is reloaded
-
-