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:
-
Consumer
BeanClassLoaderAware
BeanFactoryAware
BeanNameAware
ApplicationContextAware
ApplicationEventPublisherAware
EnvironmentAware
ResourceLoaderAware
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapplicationContextAwareObjectInitializer
(org.springframework.context.ApplicationContext applicationContext) applicationEventPublisherAwareObjectInitializer
(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) beanClassLoaderAwareObjectInitializer
(ClassLoader beanClassLoader) Returns aConsumer
capable of initializing anBeanClassLoaderAware
Object
with 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 aConsumer
capable of initializing anApplicationEventPublisherAware
Object
with the givenApplicationEventPublisher
. TheApplicationEventPublisherAware.setApplicationEventPublisher(ApplicationEventPublisher)
method is only called on theApplicationEventPublisherAware
Object
if theApplicationEventPublisherAware
is not null.- Parameters:
applicationEventPublisher
-ApplicationEventPublisher
set on theApplicationEventPublisherAware
Object
by theConsumer
.- Returns:
- a
Consumer
capable of initializing anApplicationEventPublisherAware
Object
with the givenApplicationEventPublisher
; never null. - See Also:
-
ApplicationEventPublisherAware
ApplicationEventPublisher
Consumer
-
beanClassLoaderAwareObjectInitializer
@NonNull public static Consumer<Object> beanClassLoaderAwareObjectInitializer(@Nullable ClassLoader beanClassLoader) Returns aConsumer
capable of initializing anBeanClassLoaderAware
Object
with the given beanClassLoader
. TheBeanClassLoaderAware.setBeanClassLoader(ClassLoader)
method is only called on theBeanClassLoaderAware
Object
if theClassLoader
is not null.- Parameters:
beanClassLoader
-ClassLoader
set on theBeanClassLoaderAware
Object
by theConsumer
.- Returns:
- a
Consumer
capable of initializing anBeanClassLoaderAware
Object
with the given beanClassLoader
; never null. - See Also:
-
BeanClassLoaderAware
Consumer
ClassLoader
-
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)
-