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
,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 class
AbstractJaxbConfigDao.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 void
addOnReloadedCallback(java.util.function.Consumer<V> callback)
void
afterPropertiesSet()
afterPropertiesSetorg.springframework.core.io.Resource
getConfigResource()
getConfigResourceFileReloadContainer<V>
getContainer()
getContainerString
getDescription()
getDescriptionLong
getReloadCheckInterval()
getReloadCheckIntervalprotected V
loadConfig(org.springframework.core.io.Resource resource)
loadConfigvoid
setConfigResource(org.springframework.core.io.Resource configResource)
setConfigResourcevoid
setReloadCheckInterval(Long reloadCheckInterval)
setReloadCheckIntervalprotected abstract V
translateConfig(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
- aResource
object.- Returns:
- a V object.
-
afterPropertiesSet
public void afterPropertiesSet()
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
getConfigResource
public org.springframework.core.io.Resource getConfigResource()
getConfigResource
- Returns:
- a
Resource
object.
-
setConfigResource
public void setConfigResource(org.springframework.core.io.Resource configResource)
setConfigResource
- Parameters:
configResource
- aResource
object.
-
getContainer
public FileReloadContainer<V> getContainer()
getContainer
- Returns:
- a
FileReloadContainer
object.
-
getReloadCheckInterval
public Long getReloadCheckInterval()
getReloadCheckInterval
- Returns:
- a
Long
object.
-
setReloadCheckInterval
public void setReloadCheckInterval(Long reloadCheckInterval)
setReloadCheckInterval
- Parameters:
reloadCheckInterval
- aLong
object.
-
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
-
-