org.springframework.data.gemfire
Class DeclarableSupport

java.lang.Object
  extended by org.springframework.data.gemfire.DeclarableSupport
All Implemented Interfaces:
CacheCallback, Declarable
Direct Known Subclasses:
WiringDeclarableSupport

public abstract class DeclarableSupport
extends Object
implements CacheCallback, Declarable

Convenience class for Spring-aware GemFire Declarable components. Provides a reference to the current Spring application context, e.g. for bean lookup or resource loading. Note that in most cases, one can just declare the same components as Spring beans, through RegionFactoryBean which gives access to the full container capabilities and does not enforce the Declarable interface to be implemented.

Author:
Costin Leau

Constructor Summary
DeclarableSupport()
           
 
Method Summary
 void close()
           
protected  BeanFactory getBeanFactory()
           
 void init(Properties props)
          This implementation uses this method as a lifecycle hook to initialize the bean factory locator.
protected  void initInstance(Properties props)
          Initialize the current instance based on the given properties.
 void setFactoryKey(String key)
          Sets the key under which the enclosing beanFactory can be found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeclarableSupport

public DeclarableSupport()
Method Detail

init

public final void init(Properties props)
This implementation uses this method as a lifecycle hook to initialize the bean factory locator.

Specified by:
init in interface Declarable
See Also:
setFactoryKey(String)

initInstance

protected void initInstance(Properties props)
Initialize the current instance based on the given properties.

Parameters:
props -

getBeanFactory

protected BeanFactory getBeanFactory()

close

public void close()
Specified by:
close in interface CacheCallback

setFactoryKey

public void setFactoryKey(String key)
Sets the key under which the enclosing beanFactory can be found. Needed only if multiple beanFactories are used with GemFire inside the same class loader / class space.

Parameters:
key -
See Also:
GemfireBeanFactoryLocator


Copyright © 2010 SpringSource, a division of VMware. All Rights Reserved.