public class ConfigAdminPropertiesFactoryBean extends Object implements BundleContextAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<Properties>
Configuration,
ConfigurationAdmin,
org.springframework.core.io.support.PropertiesFactoryBean| Constructor and Description |
|---|
ConfigAdminPropertiesFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
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(org.osgi.framework.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.
|
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanExceptionpublic Properties getObject() throws Exception
getObject in interface org.springframework.beans.factory.FactoryBean<Properties>Exceptionpublic Class<? extends Properties> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<Properties>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.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(org.osgi.framework.BundleContext bundleContext)
BundleContextAwareBundleContext that this bean runs in. Normally this can
be used to initialize an object.setBundleContext in interface BundleContextAwarebundleContext - 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.Copyright © 2006–2016. All rights reserved.