|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.data.gemfire.LazyWiringDeclarableSupport
public abstract class LazyWiringDeclarableSupport
The LazyWiringDeclarableSupport class is an implementation of the GemFire Declarable interface that enables support for wiring GemFire components with Spring bean dependencies defined in the Spring context.
Properties,
DisposableBean,
ApplicationListener,
ContextRefreshedEvent,
DeclarableSupport,
WiringDeclarableSupport,
Declarable| Field Summary | |
|---|---|
protected static String |
BEAN_NAME_PARAMETER
|
protected boolean |
initialized
|
| Constructor Summary | |
|---|---|
LazyWiringDeclarableSupport()
Constructs an instance of the LazyWiringDeclarableSupport class registered with the SpringContextBootstrappingInitializer to receive notification when the Spring context is created and initialized (refreshed) by GemFire in order for this Declarable component to be configured and properly initialized with any required Spring bean dependencies. |
|
| Method Summary | |
|---|---|
protected void |
assertInitialized()
Asserts that this Declarable object has been properly configured and initialized by the Spring container after GemFire has constructed this Declarable object during startup. |
void |
destroy()
When this bean gets destroyed by the Spring container, make sure this component gets unregistered from the SpringContextBootstrappingInitializer. |
protected void |
doPostInit(Properties parameters)
Default no operation method performed post initialization of this Declarable GemFire component to be overridden by subclasses for application specific extension and behavior. |
void |
init(Properties parameters)
Initialization method called by GemFire with the configured parameters once this Declarable object has been constructed during GemFire startup using an <initalizer> element in GemFire's configuration meta-data. |
protected boolean |
isInitialized()
Determines whether this Declarable object has been configured and initialized (i.e. the doInit method has been called) by the Spring container. |
void |
onApplicationEvent(ContextRefreshedEvent event)
Event handler method called when GemFire has created and initialized (refreshed) the Spring ApplicationContext using the SpringContextBootstrappingInitializer Declarable class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String BEAN_NAME_PARAMETER
protected volatile boolean initialized
| Constructor Detail |
|---|
public LazyWiringDeclarableSupport()
#register(org.springframework.context.ApplicationListener)| Method Detail |
|---|
protected void assertInitialized()
IllegalStateException - if the Declarable object has not been properly configured or initialized
by the Spring container.init(java.util.Properties),
isInitialized()protected void doPostInit(Properties parameters)
parameters - Properties instance containing the parameters from GemFire's configuration file
(e.g. cache.xml) to configure and initialize this Declarable object.doInit(org.springframework.beans.factory.config.ConfigurableListableBeanFactory, java.util.Properties)public final void init(Properties parameters)
init in interface com.gemstone.gemfire.cache.Declarableparameters - the configured parameters passed from the GemFire configuration (e.g. cache.xml) to this
Declarable as a Properties instance.
IllegalStateException - if the Declarable object's init method has already been invoked.doInit(org.springframework.beans.factory.config.ConfigurableListableBeanFactory, java.util.Properties),
Propertiesprotected boolean isInitialized()
assertInitialized(),
doInit(org.springframework.beans.factory.config.ConfigurableListableBeanFactory, java.util.Properties)public final void onApplicationEvent(ContextRefreshedEvent event)
onApplicationEvent in interface ApplicationListener<ContextRefreshedEvent>event - the ContextRefreshedEvent published by the Spring ApplicationContext after it is successfully
created and initialized by GemFire.
IllegalStateException - if the parameters have not been passed to this Declarable (i.e. GemFire has not
called this Declarable object's init method yet, which is probably a bug and violates the lifecycle contract
of Declarable GemFire objects).
IllegalArgumentException - if the ApplicationContext is not an instance of ConfigurableApplicationContext.doInit(org.springframework.beans.factory.config.ConfigurableListableBeanFactory, java.util.Properties),
ApplicationListener.onApplicationEvent(org.springframework.context.ApplicationEvent),
ContextRefreshedEvent
public void destroy()
throws Exception
destroy in interface DisposableBeanException - if bean destruction is unsuccessful.SpringContextBootstrappingInitializer.unregister(
org.springframework.context.ApplicationListener)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||