B
- the bean configuration implementation classpublic interface BeanConfigManager<B extends BeanConfig>
BeanConfig
. It rides on top of the weakly typed bean configuration properties manager (see
BeanConfigPropertiesManager
). Underneath this wrapper, the bean name ( BeanConfig.getBeanClassName()
) and the configuration properties ( BeanConfig.getProperties()
) are extracted and passed to the bean properties manager.Modifier and Type | Method and Description |
---|---|
<T extends B> |
disableBean(Class<T> clazz)
Disables a bean.
|
<T extends B> |
enableBean(Class<T> clazz)
Enable a previously set bean configuration.
|
<T extends B> |
getBeanConfig(Class<T> clazz)
Get the bean configuration represented by the specified configuration class.
|
<T extends B> |
isBeanEnabled(Class<T> clazz) |
<T extends B> |
removeBeanConfig(Class<T> clazz)
Removes a bean configuration.
|
void |
setBeanConfig(B config)
Defines a configuration for the specified bean.
|
void setBeanConfig(B config) throws EnabledBeanConfigCannotBeChangedException
An exception is raised if the bean is enabled.
config
- the bean configurationEnabledBeanConfigCannotBeChangedException
- The bean is enabled. Disable it first.<T extends B> void enableBean(Class<T> clazz) throws BeanConfigNotFoundException, BeanConfigurationException, BeanInitializationException
If the bean is already enabled, the request is silently ignored.
T
- a bean configuration implementation (see BeanConfig
)clazz
- the class of the bean configurationBeanConfigNotFoundException
- bean configuration cannot be found.BeanConfigurationException
- in the event of misconfiguration (such as failure to set
an essential property).BeanInitializationException
- if bean initialization fails.<T extends B> void disableBean(Class<T> clazz) throws BeanConfigNotFoundException
If the bean is already disabled, the request is silently ignored.
T
- a bean configuration implementation (see BeanConfig
)clazz
- the class of the bean configurationBeanConfigNotFoundException
- bean configuration cannot be found.<T extends B> boolean isBeanEnabled(Class<T> clazz)
T
- a bean configuration implementation (see BeanConfig
)clazz
- the class of the bean configurationtrue
if the bean is enabled, false
if the bean is disabled.<T extends B> boolean removeBeanConfig(Class<T> clazz) throws EnabledBeanConfigCannotBeChangedException, BeanConfigNotFoundException
An exception is raised if the bean is enabled.
T
- a bean configuration implementation (see BeanConfig
)clazz
- the class of the bean configurationtrue
if removed ,false
if it did not exist in the first
place.EnabledBeanConfigCannotBeChangedException
- The bean is enabled. Disable it first.BeanConfigNotFoundException
- bean configuration cannot be found.<T extends B> T getBeanConfig(Class<T> clazz) throws BeanConfigNotFoundException
T
- a bean configuration implementation (see BeanConfig
)clazz
- the class of the bean configurationBeanConfigNotFoundException
- bean configuration cannot be found. Need to set the
configuration first.Copyright © GigaSpaces.