public class WiringInstantiator extends org.apache.geode.Instantiator implements BeanFactoryAware, InitializingBean, DisposableBean
Instantiator
through
Instantiator.register(Instantiator)
. This behaviour can be disabled through setAutoRegister(boolean)
.
Additionally, the instantiator registration is not distributed by default, to allow the application context
to be reused. This can be changed through setDistribute(boolean)
.BeanConfigurerSupport
,
BeanWiringInfoResolver
,
Autowired
,
Resource
Constructor and Description |
---|
WiringInstantiator(Class<? extends org.apache.geode.DataSerializable> c,
int classId) |
WiringInstantiator(org.apache.geode.Instantiator instantiator) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
destroy() |
org.apache.geode.DataSerializable |
newInstance() |
void |
setAutoRegister(boolean autoRegister)
Sets the auto-registration of this
Instantiator during the container startup. |
void |
setBeanFactory(BeanFactory beanFactory) |
void |
setConfigurer(BeanConfigurerSupport configurer)
Sets the manager responsible for configuring the newly created instances.
|
void |
setDistribute(boolean distribute)
Sets the distribution of the region of this
Instantiator during the container startup. |
public WiringInstantiator(org.apache.geode.Instantiator instantiator)
public WiringInstantiator(Class<? extends org.apache.geode.DataSerializable> c, int classId)
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
public void destroy() throws Exception
destroy
in interface DisposableBean
Exception
public void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory
in interface BeanFactoryAware
BeansException
public org.apache.geode.DataSerializable newInstance()
newInstance
in class org.apache.geode.Instantiator
public void setConfigurer(BeanConfigurerSupport configurer)
configurer
- the configurer to setpublic void setAutoRegister(boolean autoRegister)
Instantiator
during the container startup.
Default is true, meaning the registration will occur once this factory is initialized.autoRegister
- the autoRegister to setInstantiator.register(Instantiator)
public void setDistribute(boolean distribute)
Instantiator
during the container startup.
Default is false, meaning the registration will not be distributed to other clients.distribute
- whether the registration is distributable or notInstantiator.register(Instantiator, boolean)
Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.