K
- JAXB classV
- Configuration object that is stored in memory (might be the same
as the JAXB class or could be a different class)public abstract class AbstractJaxbConfigDao<K,V> extends Object implements org.springframework.beans.factory.InitializingBean
Abstract AbstractJaxbConfigDao class.
Modifier and Type | Class and Description |
---|---|
class |
AbstractJaxbConfigDao.JaxbReloadCallback |
Constructor and Description |
---|
AbstractJaxbConfigDao(Class<K> entityClass,
String description)
Constructor for AbstractJaxbConfigDao.
|
Modifier and Type | Method and Description |
---|---|
void |
addOnReloadedCallback(java.util.function.Consumer<V> callback) |
void |
afterPropertiesSet()
afterPropertiesSet
|
org.springframework.core.io.Resource |
getConfigResource()
getConfigResource
|
FileReloadContainer<V> |
getContainer()
getContainer
|
String |
getDescription()
getDescription
|
Long |
getReloadCheckInterval()
getReloadCheckInterval
|
protected V |
loadConfig(org.springframework.core.io.Resource resource)
loadConfig
|
void |
setConfigResource(org.springframework.core.io.Resource configResource)
setConfigResource
|
void |
setReloadCheckInterval(Long reloadCheckInterval)
setReloadCheckInterval
|
protected abstract V |
translateConfig(K config)
translateConfig
|
protected abstract V translateConfig(K config)
translateConfig
config
- a K object.protected V loadConfig(org.springframework.core.io.Resource resource)
loadConfig
resource
- a Resource
object.public void afterPropertiesSet()
afterPropertiesSet
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public org.springframework.core.io.Resource getConfigResource()
getConfigResource
Resource
object.public void setConfigResource(org.springframework.core.io.Resource configResource)
setConfigResource
configResource
- a Resource
object.public FileReloadContainer<V> getContainer()
getContainer
FileReloadContainer
object.public Long getReloadCheckInterval()
getReloadCheckInterval
Long
object.public void setReloadCheckInterval(Long reloadCheckInterval)
setReloadCheckInterval
reloadCheckInterval
- a Long
object.public void addOnReloadedCallback(java.util.function.Consumer<V> callback)
callback
- a callback that will be called when the entity maintained by this DAO is reloadedCopyright © 2021. All rights reserved.