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:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected org.springframework.beans.factory.BeanFactory
    Returns a reference to the Spring BeanFactory.
    protected String
    Returns the key used to lookup the Spring BeanFactory.
    protected org.springframework.beans.factory.BeanFactory
    Returns a reference to the Spring BeanFactory.
    protected org.springframework.beans.factory.BeanFactory
    locateBeanFactory(String beanFactoryKey)
    Returns a reference to the Spring BeanFactory for the given beanFactoryKey.
    void
    setBeanFactoryKey(String beanFactoryKey)
    Set the key used to lookup the Spring BeanFactory.

    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 Spring BeanFactory.
      Returns:
      a reference to the Spring BeanFactory.
      See Also:
    • setBeanFactoryKey

      public void setBeanFactoryKey(String beanFactoryKey)
      Set the key used to lookup the Spring BeanFactory.
      Parameters:
      beanFactoryKey - String containing the key used to lookup the Spring BeanFactory.
    • getBeanFactoryKey

      protected String getBeanFactoryKey()
      Returns the key used to lookup the Spring BeanFactory.
      Returns:
      a String containing the key used to lookup the Spring BeanFactory.
    • locateBeanFactory

      protected org.springframework.beans.factory.BeanFactory locateBeanFactory()
      Returns a reference to the Spring BeanFactory.
      Returns:
      a reference to the Spring BeanFactory.
      See Also:
    • locateBeanFactory

      protected org.springframework.beans.factory.BeanFactory locateBeanFactory(String beanFactoryKey)
      Returns a reference to the Spring BeanFactory for the given beanFactoryKey.
      Parameters:
      beanFactoryKey - String containing the key used to lookup the Spring BeanFactory.
      Returns:
      a reference to the Spring BeanFactory for the given beanFactoryKey.
      See Also:
    • close

      public void close()
      Specified by:
      close in interface org.apache.geode.cache.CacheCallback