Class WiringDeclarableSupport
java.lang.Object
org.springframework.data.gemfire.support.DeclarableSupport
org.springframework.data.gemfire.support.WiringDeclarableSupport
- All Implemented Interfaces:
CacheCallback
,Declarable
- Direct Known Subclasses:
AbstractAuthInitialize
,LazyWiringDeclarableSupport
Declarable
support class used to wire declaring, implementing instances through the Spring container.
This implementation first looks for a 'bean-name' property, which will be used to locate
a Spring bean definition used as the 'template' for auto-wiring purposes. Auto-wiring will be performed
based on the settings defined in the Spring container.- Author:
- Costin Leau, John Blum
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
configureThis
(String templateBeanName) Configures thisDeclarable
object using a Spring bean defined and identified in the SpringBeanFactory
with the givenname
used as a template for the auto-wiring function.protected boolean
configureThis
(BeanFactory beanFactory, String templateBeanName) Configures thisDeclarable
object using a Spring bean defined and identified in the given SpringBeanFactory
with the givenname
used as a template for the auto-wiring function.void
initialize
(Cache cache, Properties parameters) protected BeanConfigurerSupport
newBeanConfigurer
(BeanFactory beanFactory) Constructs a new instance ofBeanConfigurerSupport
configured with the given SpringBeanFactory
.protected BeanConfigurerSupport
newBeanConfigurer
(BeanFactory beanFactory, String templateBeanName) Constructs a new instance ofBeanConfigurerSupport
configured with the given SpringBeanFactory
andname
of a Spring bean defined in the SpringBeanFactory
used as a template to auto-wire thisDeclarable
object.Methods inherited from class org.springframework.data.gemfire.support.DeclarableSupport
close, getBeanFactory, getBeanFactoryKey, locateBeanFactory, locateBeanFactory, setBeanFactoryKey
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.geode.cache.Declarable
init
-
Field Details
-
TEMPLATE_BEAN_NAME_PROPERTY
- See Also:
-
-
Constructor Details
-
WiringDeclarableSupport
public WiringDeclarableSupport()
-
-
Method Details
-
initialize
-
configureThis
Configures thisDeclarable
object using a Spring bean defined and identified in the SpringBeanFactory
with the givenname
used as a template for the auto-wiring function.- Parameters:
templateBeanName
-String
containing the name of the Spring bean used as a template for the auto-wiring function.- Returns:
- a boolean value indicating whether this
Declarable
object was successfully configured and initialized by the Spring container. - See Also:
-
configureThis
protected boolean configureThis(@NonNull BeanFactory beanFactory, @Nullable String templateBeanName) Configures thisDeclarable
object using a Spring bean defined and identified in the given SpringBeanFactory
with the givenname
used as a template for the auto-wiring function.- Parameters:
beanFactory
- SpringBeanFactory
used to auto-wire, configure and initialize thisDeclarable
object; must not be nulltemplateBeanName
-String
containing the name of the Spring bean used as a template for the auto-wiring function.- Returns:
- a boolean value indicating whether this
Declarable
object was successfully configured and initialized by the Spring container. - See Also:
-
newBeanConfigurer
Constructs a new instance ofBeanConfigurerSupport
configured with the given SpringBeanFactory
.- Parameters:
beanFactory
- reference to the SpringBeanFactory
; must not be null.- Returns:
- a new
BeanConfigurerSupport
configured with the given SpringBeanFactory
. - See Also:
-
newBeanConfigurer
@NonNull protected BeanConfigurerSupport newBeanConfigurer(@NonNull BeanFactory beanFactory, @Nullable String templateBeanName) Constructs a new instance ofBeanConfigurerSupport
configured with the given SpringBeanFactory
andname
of a Spring bean defined in the SpringBeanFactory
used as a template to auto-wire thisDeclarable
object.- Parameters:
beanFactory
- reference to the SpringBeanFactory
; must not be null.templateBeanName
-String
containing the name of a Spring bean declared in the SpringBeanFactory
used as a template to auto-wire thisDeclarable
object.- Returns:
- a new
BeanConfigurerSupport
configured with the given SpringBeanFactory
. - See Also:
-