public class FlattenedBeanConfigPropertiesManager extends Object implements BeanConfigPropertiesManager
Constructor and Description |
---|
FlattenedBeanConfigPropertiesManager(String classnamesKey,
String enabledClassnameKey,
Map<String,String> properties) |
Modifier and Type | Method and Description |
---|---|
void |
disableAllBeans()
Disable all currently enabled beans.
|
void |
disableBean(String beanClassName)
Disables a bean.
|
void |
enableBean(String beanClassName)
Disables a bean.
|
Map<String,String> |
getBeanConfig(String beanClassName)
Get the bean configuration.
|
String[] |
getBeansClassNames()
Lists the class names of configured beans.
|
String[] |
getEnabledBeansClassNames()
Lists the class names of enabled beans.
|
protected StringProperties |
getProperties() |
boolean |
isBeanEnabled(String beanClassName) |
boolean |
removeBeanConfig(String beanClassName)
Removes a bean configuration.
|
void |
setBeanConfig(String beanClassName,
Map<String,String> properties)
Defines a configuration for the specified bean.
|
public void setBeanConfig(String beanClassName, Map<String,String> properties) throws BeanConfigNotFoundException
BeanConfigPropertiesManager
An exception is raised if the bean is enabled.
setBeanConfig
in interface BeanConfigPropertiesManager
beanClassName
- the bean class nameproperties
- the String key-value pairs used to configure this bean.BeanConfigNotFoundException
public void enableBean(String beanClassName) throws BeanConfigNotFoundException
BeanConfigPropertiesManager
If the bean is already disabled, the request is silently ignored.
enableBean
in interface BeanConfigPropertiesManager
beanClassName
- the bean class nameBeanConfigNotFoundException
- bean configuration cannot be found.public void disableBean(String beanClassName) throws BeanConfigNotFoundException
BeanConfigPropertiesManager
If the bean is already disabled, the request is silently ignored.
disableBean
in interface BeanConfigPropertiesManager
beanClassName
- the bean class nameBeanConfigNotFoundException
- bean configuration cannot be found.public boolean removeBeanConfig(String beanClassName)
BeanConfigPropertiesManager
An exception is raised if the bean is enabled.
removeBeanConfig
in interface BeanConfigPropertiesManager
beanClassName
- the bean class nametrue
if removed ,false
if it did not exist in the first
place.public boolean isBeanEnabled(String beanClassName)
isBeanEnabled
in interface BeanConfigPropertiesManager
beanClassName
- the bean class nametrue
if the bean is enabled, false
if the bean is disabled.public String[] getEnabledBeansClassNames()
BeanConfigPropertiesManager
getEnabledBeansClassNames
in interface BeanConfigPropertiesManager
BeanConfigPropertiesManager.enableBean(String)
public Map<String,String> getBeanConfig(String beanClassName) throws BeanConfigNotFoundException
BeanConfigPropertiesManager
getBeanConfig
in interface BeanConfigPropertiesManager
beanClassName
- the bean class nameBeanConfigNotFoundException
- bean configuration cannot be found. Put the configuration
first.public String[] getBeansClassNames()
BeanConfigPropertiesManager
getBeansClassNames
in interface BeanConfigPropertiesManager
public void disableAllBeans()
BeanConfigPropertiesManager
disableAllBeans
in interface BeanConfigPropertiesManager
BeanConfigPropertiesManager.disableBean(String)
protected StringProperties getProperties()
Copyright © GigaSpaces.