Class DeclarableSupport
java.lang.Object
org.springframework.data.gemfire.support.DeclarableSupport
- All Implemented Interfaces:
org.apache.geode.cache.CacheCallback
,org.apache.geode.cache.Declarable
- Direct Known Subclasses:
WiringDeclarableSupport
public abstract class DeclarableSupport
extends Object
implements org.apache.geode.cache.CacheCallback, org.apache.geode.cache.Declarable
Abstract base class for implementing Spring aware, Apache Geode
Declarable
components.
Provides subclasses with a reference to the current Spring BeanFactory
in order to
perform Spring bean lookups or resource loading.
Note, in most cases, the developer should just declare the same Apache Geode components as Spring beans
in the Spring container through the PeerRegionFactoryBean
, which gives full access to the Spring container
capabilities and does not enforce the Declarable
interface to be implemented.- See Also:
-
CacheCallback
Declarable
BeanFactory
GemfireBeanFactoryLocator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected org.springframework.beans.factory.BeanFactory
Returns a reference to the SpringBeanFactory
.protected String
Returns the key used to lookup the SpringBeanFactory
.protected org.springframework.beans.factory.BeanFactory
Returns a reference to the SpringBeanFactory
.protected org.springframework.beans.factory.BeanFactory
locateBeanFactory
(String beanFactoryKey) Returns a reference to the SpringBeanFactory
for the givenbeanFactoryKey
.void
setBeanFactoryKey
(String beanFactoryKey) Set the key used to lookup the SpringBeanFactory
.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, initialize
-
Constructor Details
-
DeclarableSupport
public DeclarableSupport()
-
-
Method Details
-
getBeanFactory
protected org.springframework.beans.factory.BeanFactory getBeanFactory()Returns a reference to the SpringBeanFactory
.- Returns:
- a reference to the Spring
BeanFactory
. - See Also:
-
setBeanFactoryKey
Set the key used to lookup the SpringBeanFactory
.- Parameters:
beanFactoryKey
-String
containing the key used to lookup the SpringBeanFactory
.
-
getBeanFactoryKey
Returns the key used to lookup the SpringBeanFactory
.- Returns:
- a
String
containing the key used to lookup the SpringBeanFactory
.
-
locateBeanFactory
protected org.springframework.beans.factory.BeanFactory locateBeanFactory()Returns a reference to the SpringBeanFactory
.- Returns:
- a reference to the Spring
BeanFactory
. - See Also:
-
BeanFactory
locateBeanFactory(String)
getBeanFactoryKey()
-
locateBeanFactory
Returns a reference to the SpringBeanFactory
for the givenbeanFactoryKey
.- Parameters:
beanFactoryKey
-String
containing the key used to lookup the SpringBeanFactory
.- Returns:
- a reference to the Spring
BeanFactory
for the givenbeanFactoryKey
. - See Also:
-
GemfireBeanFactoryLocator.useBeanFactory(String)
BeanFactory
-
close
public void close()- Specified by:
close
in interfaceorg.apache.geode.cache.CacheCallback
-