|
GigaSpaces XAP 10.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openspaces.core.bean.DefaultBeanServer<T>
public class DefaultBeanServer<T extends Bean>
| Constructor Summary | |
|---|---|
DefaultBeanServer(Admin admin)
|
|
DefaultBeanServer(BeanFactory<T> beanFactory)
|
|
| Method Summary | |
|---|---|
void |
destroy()
|
void |
disableAllBeans()
Disable all currently enabled beans. |
void |
disableAllBeansAssignableTo(Class<?> interfaceClass)
Disables all beans that implement the specified interface. |
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. |
T |
getEnabledBean(String beanClassName)
|
List<T> |
getEnabledBeansAssignableTo(Class<?>[] interfaceClasses)
|
String[] |
getEnabledBeansClassNames()
Lists the class names of enabled beans. |
List<String> |
getEnabledBeansClassNamesAssignableTo(Class<?>[] interfaceClasses)
|
boolean |
isBeanEnabled(String beanClassName)
|
boolean |
removeBeanConfig(String beanClassName)
Removes a bean configuration. |
void |
replaceBeanAssignableTo(Class<?>[] interfaceClasses,
String newBeanClassName,
Map<String,String> newBeanProperties)
Assuming there is at most one enabled bean that implements one of the specified interfaces, puts the specified configuration and enables a new bean in its place. |
void |
setBeanConfig(String beanClassName,
Map<String,String> properties)
Defines a configuration for the specified bean. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultBeanServer(Admin admin)
public DefaultBeanServer(BeanFactory<T> beanFactory)
| Method Detail |
|---|
public void setBeanConfig(String beanClassName,
Map<String,String> properties)
throws EnabledBeanConfigCannotBeChangedException
BeanConfigPropertiesManagerAn exception is raised if the bean is enabled.
setBeanConfig in interface BeanConfigPropertiesManagerbeanClassName - the bean class nameproperties - the String key-value pairs used to configure this bean.
EnabledBeanConfigCannotBeChangedException - The bean is enabled. Disable it first.
public void enableBean(String beanClassName)
throws BeanConfigNotFoundException,
BeanConfigurationException,
BeanInitializationException
BeanConfigPropertiesManagerIf the bean is already disabled, the request is silently ignored.
enableBean in interface BeanConfigPropertiesManagerbeanClassName - the bean class name
BeanConfigNotFoundException - bean configuration cannot be found.
BeanConfigurationException - in the event of misconfiguration (such as failure to set an essential property).
BeanInitializationException - if bean initialization fails.
public void disableBean(String beanClassName)
throws BeanConfigNotFoundException
BeanConfigPropertiesManagerIf the bean is already disabled, the request is silently ignored.
disableBean in interface BeanConfigPropertiesManagerbeanClassName - the bean class name
BeanConfigNotFoundException - bean configuration cannot be found.
public boolean removeBeanConfig(String beanClassName)
throws BeanConfigNotFoundException
BeanConfigPropertiesManagerAn exception is raised if the bean is enabled.
removeBeanConfig in interface BeanConfigPropertiesManagerbeanClassName - the bean class name
true if removed ,false if it did not exist in the first place.
BeanConfigNotFoundException - bean configuration cannot be found.public boolean isBeanEnabled(String beanClassName)
isBeanEnabled in interface BeanConfigPropertiesManagerbeanClassName - the bean class name
true if the bean is enabled, false if the bean is disabled.
public Map<String,String> getBeanConfig(String beanClassName)
throws BeanConfigNotFoundException
BeanConfigPropertiesManager
getBeanConfig in interface BeanConfigPropertiesManagerbeanClassName - the bean class name
BeanConfigNotFoundException - bean configuration cannot be found. Put the configuration first.public String[] getBeansClassNames()
BeanConfigPropertiesManager
getBeansClassNames in interface BeanConfigPropertiesManagerpublic String[] getEnabledBeansClassNames()
BeanConfigPropertiesManager
getEnabledBeansClassNames in interface BeanConfigPropertiesManagerBeanConfigPropertiesManager.enableBean(String)public void disableAllBeans()
BeanConfigPropertiesManager
disableAllBeans in interface BeanConfigPropertiesManagerBeanConfigPropertiesManager.disableBean(String)public T getEnabledBean(String beanClassName)
getEnabledBean in interface BeanServer<T extends Bean>public void disableAllBeansAssignableTo(Class<?> interfaceClass)
BeanServer
disableAllBeansAssignableTo in interface BeanServer<T extends Bean>
public void replaceBeanAssignableTo(Class<?>[] interfaceClasses,
String newBeanClassName,
Map<String,String> newBeanProperties)
throws BeanInitializationException
BeanServer
replaceBeanAssignableTo in interface BeanServer<T extends Bean>interfaceClasses - - the interface that the new and old bean need to implementnewBeanClassName - - the class name of the beannewBeanProperties - - the new bean configuration that is to replace the existing specified interface implementation.
BeanInitializationException
public List<String> getEnabledBeansClassNamesAssignableTo(Class<?>[] interfaceClasses)
throws ClassNotFoundException
getEnabledBeansClassNamesAssignableTo in interface BeanServer<T extends Bean>interfaceClasses - - the interface that the bean we are looking for needs to implement
ClassNotFoundExceptionpublic void destroy()
destroy in interface BeanServer<T extends Bean>public List<T> getEnabledBeansAssignableTo(Class<?>[] interfaceClasses)
getEnabledBeansAssignableTo in interface BeanServer<T extends Bean>interfaceClasses - - the interface that the bean we are looking for needs to implement
|
GigaSpaces XAP 10.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||