GigaSpaces XAP 10.0.1 API

org.openspaces.core.bean
Interface BeanServer<T extends Bean>

All Superinterfaces:
BeanConfigPropertiesManager
All Known Implementing Classes:
DefaultBeanServer

public interface BeanServer<T extends Bean>
extends BeanConfigPropertiesManager


Method Summary
 void destroy()
           
 void disableAllBeansAssignableTo(Class<?> interfaceClass)
          Disables all beans that implement the specified interface.
 T getEnabledBean(String beanClassName)
           
 List<T> getEnabledBeansAssignableTo(Class<?>[] interfaceClasses)
           
 List<String> getEnabledBeansClassNamesAssignableTo(Class<?>[] interfaceClasses)
           
 boolean replaceBeanAssignableTo(Class<?>[] interfaceClasses, String beanClassName, Map<String,String> properties)
          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.
 
Methods inherited from interface org.openspaces.admin.bean.BeanConfigPropertiesManager
disableAllBeans, disableBean, enableBean, getBeanConfig, getBeansClassNames, getEnabledBeansClassNames, isBeanEnabled, removeBeanConfig, setBeanConfig
 

Method Detail

getEnabledBean

T getEnabledBean(String beanClassName)
Parameters:
beanClassName -
Returns:
the bean instance of the specified class name, or null if not enabled.

disableAllBeansAssignableTo

void disableAllBeansAssignableTo(Class<?> interfaceClass)
Disables all beans that implement the specified interface.

Parameters:
interfaceClass -

replaceBeanAssignableTo

boolean replaceBeanAssignableTo(Class<?>[] interfaceClasses,
                                String beanClassName,
                                Map<String,String> properties)
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.

Parameters:
interfaceClasses - - the interface that the new and old bean need to implement
beanClassName - - the class name of the bean
properties - - the new bean configuration that is to replace the existing specified interface implementation.
Returns:
true -if bean reaplaced, false if no configuration change detected.
Throws:
IllegalStateException - - if more than one enabled bean implements any of the specified interfaces
BeanConfigException - - if the bean initialization failed.

destroy

void destroy()

getEnabledBeansAssignableTo

List<T> getEnabledBeansAssignableTo(Class<?>[] interfaceClasses)
Parameters:
interfaceClasses - - the interface that the bean we are looking for needs to implement
Returns:
the enabled bean that implements any one of the specified interfaces.

getEnabledBeansClassNamesAssignableTo

List<String> getEnabledBeansClassNamesAssignableTo(Class<?>[] interfaceClasses)
                                                   throws ClassNotFoundException
Parameters:
interfaceClasses - - the interface that the bean we are looking for needs to implement
Returns:
the enabled bean class names that implements any one of the specified interfaces.
Throws:
ClassNotFoundException

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.