Class ObjectAwareUtils
java.lang.Object
org.springframework.geode.core.util.ObjectAwareUtils
Abstract utility class used to process
managed object aware objects,
such as ApplicationContextAware objects in a Spring context.- Since:
- 1.3.1
- See Also:
-
ConsumerBeanClassLoaderAwareBeanFactoryAwareBeanNameAwareApplicationContextAwareApplicationEventPublisherAwareEnvironmentAwareResourceLoaderAware
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplicationContextAwareObjectInitializer(org.springframework.context.ApplicationContext applicationContext) applicationEventPublisherAwareObjectInitializer(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) beanClassLoaderAwareObjectInitializer(ClassLoader beanClassLoader) Returns aConsumercapable of initializing anBeanClassLoaderAwareObjectwith the given beanClassLoader.beanFactoryAwareObjectInitializer(org.springframework.beans.factory.BeanFactory beanFactory) beanNameAwareObjectInitializer(String beanName) environmentAwareObjectInitializer(org.springframework.core.env.Environment environment) resourceLoaderAwareObjectInitializer(org.springframework.core.io.ResourceLoader resourceLoader)
-
Field Details
-
NO_OP
-
-
Constructor Details
-
ObjectAwareUtils
public ObjectAwareUtils()
-
-
Method Details
-
applicationContextAwareObjectInitializer
@NonNull public static Consumer<Object> applicationContextAwareObjectInitializer(@Nullable org.springframework.context.ApplicationContext applicationContext) -
applicationEventPublisherAwareObjectInitializer
@NonNull public static Consumer<Object> applicationEventPublisherAwareObjectInitializer(@Nullable org.springframework.context.ApplicationEventPublisher applicationEventPublisher) Returns aConsumercapable of initializing anApplicationEventPublisherAwareObjectwith the givenApplicationEventPublisher. TheApplicationEventPublisherAware.setApplicationEventPublisher(ApplicationEventPublisher)method is only called on theApplicationEventPublisherAwareObjectif theApplicationEventPublisherAwareis not null.- Parameters:
applicationEventPublisher-ApplicationEventPublisherset on theApplicationEventPublisherAwareObjectby theConsumer.- Returns:
- a
Consumercapable of initializing anApplicationEventPublisherAwareObjectwith the givenApplicationEventPublisher; never null. - See Also:
-
ApplicationEventPublisherAwareApplicationEventPublisherConsumer
-
beanClassLoaderAwareObjectInitializer
@NonNull public static Consumer<Object> beanClassLoaderAwareObjectInitializer(@Nullable ClassLoader beanClassLoader) Returns aConsumercapable of initializing anBeanClassLoaderAwareObjectwith the given beanClassLoader. TheBeanClassLoaderAware.setBeanClassLoader(ClassLoader)method is only called on theBeanClassLoaderAwareObjectif theClassLoaderis not null.- Parameters:
beanClassLoader-ClassLoaderset on theBeanClassLoaderAwareObjectby theConsumer.- Returns:
- a
Consumercapable of initializing anBeanClassLoaderAwareObjectwith the given beanClassLoader; never null. - See Also:
-
BeanClassLoaderAwareConsumerClassLoader
-
beanFactoryAwareObjectInitializer
@NonNull public static Consumer<Object> beanFactoryAwareObjectInitializer(@Nullable org.springframework.beans.factory.BeanFactory beanFactory) -
beanNameAwareObjectInitializer
-
environmentAwareObjectInitializer
@NonNull public static Consumer<Object> environmentAwareObjectInitializer(@Nullable org.springframework.core.env.Environment environment) -
resourceLoaderAwareObjectInitializer
@NonNull public static Consumer<Object> resourceLoaderAwareObjectInitializer(@Nullable org.springframework.core.io.ResourceLoader resourceLoader)
-