public abstract class LazyWiringDeclarableSupport extends WiringDeclarableSupport implements ApplicationListener<ContextRefreshedEvent>, DisposableBean
LazyWiringDeclarableSupport class is an implementation of Pivotal GemFire's Declarable interface
that enables support for wiring Pivotal GemFire components with Spring bean dependencies defined in
a Spring ApplicationContext.BeanFactory,
DisposableBean,
ApplicationContext,
ApplicationListener,
ContextRefreshedEvent,
SpringContextBootstrappingInitializer,
WiringDeclarableSupport,
DeclarableTEMPLATE_BEAN_NAME_PROPERTY| Constructor and Description |
|---|
LazyWiringDeclarableSupport()
Constructs a new instance of the
LazyWiringDeclarableSupport class registered with the
SpringContextBootstrappingInitializer as a Spring ApplicationListener. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertInitialized()
Asserts that this
Declarable object has been properly configured and initialized by the Spring container
after has Pivotal GemFire constructed this Declarable object during startup. |
protected void |
assertUninitialized()
Asserts that this
Declarable object has not yet been used, or activated prior to being fully constructed,
configured and initialized by the Spring container. |
void |
destroy()
When this
Declarable object/bean gets destroyed by the Spring container, destroy() will
make sure this component gets unregistered from the SpringContextBootstrappingInitializer properly. |
protected void |
doPostInit(Properties parameters)
Performs any post configuration and initialization activities required by the application.
|
void |
init(Properties parameters)
Initialization method called by Pivotal GemFire with the configured parameters once this
Declarable object
has been constructed by Pivotal GemFire and the <initalizer> element is parsed
in Pivotal GemFire's configuration meta-data during startup. |
protected boolean |
isInitialized()
Determines whether this
Declarable object has been properly configured and initialized
by the Spring container. |
protected boolean |
isNotInitialized()
Determines whether this
Declarable object has been properly configured and initialized
by the Spring container. |
protected Properties |
nullSafeGetParameters()
Null-safe operation to return the parameters passed to this
Declarable object when created by GemFire
from it's own configuration meta-data (e.g. |
void |
onApplicationEvent(ContextRefreshedEvent event)
Event handler method called when Pivotal GemFire has created and initialized (refreshed)
the Spring
ApplicationContext using the SpringContextBootstrappingInitializer. |
protected void |
setParameters(Properties parameters)
Stores a reference to the
parameters passed to the Declarable.init(Properties) method. |
configureThis, configureThis, newBeanConfigurer, newBeanConfigurerclose, getBeanFactory, getBeanFactoryKey, locateBeanFactory, locateBeanFactory, setBeanFactoryKeypublic LazyWiringDeclarableSupport()
LazyWiringDeclarableSupport class registered with the
SpringContextBootstrappingInitializer as a Spring ApplicationListener.
This Declarable object will receive notifications from the SpringContextBootstrappingInitializer
when the Spring context is created and initialized (refreshed). The notification is necessary in order for
this Declarable object to be properly configured and initialized with any required,
Spring-defined dependencies.protected void assertInitialized()
Declarable object has been properly configured and initialized by the Spring container
after has Pivotal GemFire constructed this Declarable object during startup.
This method is recommended to be called before any of this Declarable object's CacheCallback
methods (e.g. CacheLoader.load(LoaderHelper) are invoked in order to ensure that this Declarable
object was properly constructed, configured and initialized by the Spring container before hand.IllegalStateException - if this Declarable object was not been properly constructed, configured
and initialized by the Spring container.init(java.util.Properties),
isInitialized()protected void assertUninitialized()
Declarable object has not yet been used, or activated prior to being fully constructed,
configured and initialized by the Spring container.
It is possible, though rare, that the init(Properties) method might be called multiple times by GemFire
before the Spring container constructs, configures, initializes and generally puts this component to use.IllegalStateException - if the Declarable object has already been configured and initialized
by the Spring container.init(java.util.Properties),
isNotInitialized()protected boolean isInitialized()
Declarable object has been properly configured and initialized
by the Spring container.Declarable object has been properly configured
and initialized by the Spring container.doInit(BeanFactory, Properties),
assertInitialized()protected boolean isNotInitialized()
Declarable object has been properly configured and initialized
by the Spring container.Declarable object has been properly configured
and initialized by the Spring container.doInit(BeanFactory, Properties),
isInitialized()public final void init(Properties parameters)
Declarable object
has been constructed by Pivotal GemFire and the <initalizer> element is parsed
in Pivotal GemFire's configuration meta-data during startup.init in interface org.apache.geode.cache.Declarableinit in class WiringDeclarableSupportparameters - Properties containing the configured parameters parsed from Pivotal GemFire's
configuration meta-data (e.g. cache.xml) and passed to this Declarable object.doInit(BeanFactory, Properties),
Propertiesprotected void doPostInit(Properties parameters)
parameters - Properties containing the configured parameters parsed from Pivotal GemFire's
configuration meta-data (e.g. cache.xml) and passed to this Declarable object.doInit(BeanFactory, Properties),
Propertiesprotected Properties nullSafeGetParameters()
Declarable object when created by GemFire
from it's own configuration meta-data (e.g. cache.xml).Properties containing the configured parameters parsed from Pivotal GemFire's configuration meta-data
(e.g. cache.xml) and passed to this Declarable object.Propertiesprotected void setParameters(Properties parameters)
parameters passed to the Declarable.init(Properties) method.parameters - Properties containing the configured parameters parsed from Pivotal GemFire's
configuration meta-data (e.g. cache.xml) and passed to this Declarable object.Propertiespublic final void onApplicationEvent(ContextRefreshedEvent event)
ApplicationContext using the SpringContextBootstrappingInitializer.onApplicationEvent in interface ApplicationListener<ContextRefreshedEvent>event - ContextRefreshedEvent published by the Spring ApplicationContext after it is
successfully created and initialized by GemFire.ContextRefreshedEvent,
doInit(BeanFactory, Properties),
nullSafeGetParameters()public void destroy()
throws Exception
Declarable object/bean gets destroyed by the Spring container, destroy() will
make sure this component gets unregistered from the SpringContextBootstrappingInitializer properly.destroy in interface DisposableBeanException - if bean destruction is unsuccessful.#unregister(org.springframework.context.ApplicationListener),
setParameters(Properties)Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.