public abstract class LazyWiringDeclarableSupport extends Object implements ApplicationListener<ContextRefreshedEvent>, Declarable, DisposableBean
Properties
,
DisposableBean
,
ApplicationListener
,
ContextRefreshedEvent
,
DeclarableSupport
,
WiringDeclarableSupport
,
Declarable
Modifier and Type | Field and Description |
---|---|
protected static String |
BEAN_NAME_PARAMETER |
Constructor and Description |
---|
LazyWiringDeclarableSupport()
Constructs an instance of the LazyWiringDeclarableSupport class registered with the
SpringContextBootstrappingInitializer.
|
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 GemFire has 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 configured
and initialized.
|
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 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.
|
protected Properties |
nullSafeGetParameters()
Null-safe operation to return the parameters passed to this Declarable object when created by GemFire from it's
configuration meta-data.
|
void |
onApplicationEvent(ContextRefreshedEvent event)
Event handler method called when GemFire has created and initialized (refreshed) the Spring ApplicationContext
using the SpringContextBootstrappingInitializer Declarable class.
|
protected static final String BEAN_NAME_PARAMETER
public LazyWiringDeclarableSupport()
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 assertUninitialized()
IllegalStateException
- if the Declarable object has already been configured and 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 Declarable
parameters
- the configured parameters passed from the GemFire configuration (e.g. cache.xml) to this
Declarable as a Properties instance.IllegalStateException
- if this Declarable object has already been configured/initialized
by the Spring container and is currently active.doInit(org.springframework.beans.factory.config.ConfigurableListableBeanFactory, java.util.Properties)
,
Properties
protected boolean isInitialized()
assertInitialized()
,
doInit(org.springframework.beans.factory.config.ConfigurableListableBeanFactory, java.util.Properties)
protected Properties nullSafeGetParameters()
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.IllegalArgumentException
- if the ApplicationContext is not an instance of ConfigurableApplicationContext.doInit(org.springframework.beans.factory.config.ConfigurableListableBeanFactory, java.util.Properties)
,
nullSafeGetParameters()
,
ApplicationListener.onApplicationEvent(org.springframework.context.ApplicationEvent)
,
ContextRefreshedEvent
public void destroy() throws Exception
destroy
in interface DisposableBean
Exception
- if bean destruction is unsuccessful.#unregister(org.springframework.context.ApplicationListener)