|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.osgi.compendium.cm.ConfigAdminPropertiesFactoryBean
public class ConfigAdminPropertiesFactoryBean
FactoryBean returning the properties stored under a given persistent id in the ConfigurationAdmin service. Once retrieved, the properties will remain the same, even when the configuration object that it maps, changes. Note: This implementation performs a lazy initialization of the properties to receive the most up to date configuration.
Configuration
,
ConfigurationAdmin
,
PropertiesFactoryBean
Constructor Summary | |
---|---|
ConfigAdminPropertiesFactoryBean()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
void |
destroy()
|
Properties |
getObject()
|
Class<? extends Properties> |
getObjectType()
|
String |
getPersistentId()
Returns the persistentId. |
boolean |
isDynamic()
Indicates whether the returned properties object is dynamic or not. |
boolean |
isSingleton()
|
void |
setBundleContext(BundleContext bundleContext)
Set the BundleContext that this bean runs in. |
void |
setDynamic(boolean dynamic)
Indicates if the returned configuration is dynamic or static. |
void |
setInitLazy(boolean initLazy)
Specifies whether the properties reflecting the Configuration Admin service entry will be initialized lazy or not. |
void |
setInitTimeout(long initTimeout)
Specifies the amount of time (in milliseconds) the bean factory will wait for the Configuration Admin entry to be initialized (return a non-null value). |
void |
setLocalOverride(boolean localOverride)
Sets whether local properties override properties from files. |
void |
setPersistentId(String persistentId)
Sets the ConfigurationAdmin persistent Id that the bean should read. |
void |
setProperties(Properties properties)
Sets the local properties, e.g. via the nested tag in XML bean definitions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigAdminPropertiesFactoryBean()
Method Detail |
---|
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public void destroy() throws Exception
destroy
in interface DisposableBean
Exception
public Properties getObject() throws Exception
getObject
in interface FactoryBean<Properties>
Exception
public Class<? extends Properties> getObjectType()
getObjectType
in interface FactoryBean<Properties>
public boolean isSingleton()
isSingleton
in interface FactoryBean<Properties>
public String getPersistentId()
public void setPersistentId(String persistentId)
persistentId
- The persistentId to set.public void setProperties(Properties properties)
public void setLocalOverride(boolean localOverride)
Default is "false": Properties from the Configuration Admin override local defaults. Can be switched to "true" to let local properties override the Configuration Admin properties.
public void setBundleContext(BundleContext bundleContext)
BundleContextAware
BundleContext
that this bean runs in. Normally this can
be used to initialize an object.
setBundleContext
in interface BundleContextAware
bundleContext
- the BundleContext
object to be used
by this objectpublic boolean isDynamic()
public void setDynamic(boolean dynamic)
ServicePropertiesChangeListener
contract.
dynamic
- whether the returned object reflects the changes in the configuration admin or not.public void setInitLazy(boolean initLazy)
initLazy
- whether or not the bean is lazily initializedpublic void setInitTimeout(long initTimeout)
initTimeout
- the amount of time to wait for the entry to be initialized.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |