Package energy.eddie.spring
Class SharedBeansRegistrar
java.lang.Object
energy.eddie.spring.SharedBeansRegistrar
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor
public class SharedBeansRegistrar
extends Object
implements org.springframework.beans.factory.config.BeanPostProcessor
BeanPostProcessor that checks for all beans whether it (or any ancestor interfaces of the Bean) is annotated
with Shared. It will re-register any annotated Bean in the parent context.
To add support for any region connector to share their Beans with the parent context, annotate this class with
RegionConnectorExtension and move it into the same package as the other extensions.-
Constructor Summary
ConstructorsConstructorDescriptionSharedBeansRegistrar(org.springframework.beans.factory.config.ConfigurableListableBeanFactory localBeanFactory) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.config.BeanPostProcessor
postProcessBeforeInitialization
-
Constructor Details
-
SharedBeansRegistrar
public SharedBeansRegistrar(org.springframework.beans.factory.config.ConfigurableListableBeanFactory localBeanFactory) - See Also:
-
-
Method Details
-
postProcessAfterInitialization
public Object postProcessAfterInitialization(@NonNull Object bean, @NonNull String beanName) throws org.springframework.beans.BeansException - Specified by:
postProcessAfterInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor- Throws:
org.springframework.beans.BeansException
-