public class InstantiatorFactoryBean extends Object implements BeanClassLoaderAware, FactoryBean<Collection<Instantiator>>, InitializingBean
FactoryBean
that eases registration of custom Instantiator
through
InstantiatorGenerator
s, inside the Spring container.
By default, the returns Instantiator
s (created through AsmInstantiatorGenerator
if a custom
generator is not specified) are registered at startup with GemFire.Constructor and Description |
---|
InstantiatorFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
Collection<Instantiator> |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setAutoRegister(boolean autoRegister)
Sets the auto-registration of this
Instantiator during the container startup. |
void |
setBeanClassLoader(ClassLoader classLoader) |
void |
setCustomTypes(Map<Class<? extends DataSerializable>,Integer> types)
Sets the custom types and associated user ids for generating the
Instantiator s. |
void |
setDistribute(boolean distribute)
Sets the distribution of the region of this
Instantiator during the container startup. |
void |
setGenerator(InstantiatorGenerator generator)
Sets the generator to use for creating
Instantiator s. |
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public Collection<Instantiator> getObject() throws Exception
getObject
in interface FactoryBean<Collection<Instantiator>>
Exception
public Class<?> getObjectType()
getObjectType
in interface FactoryBean<Collection<Instantiator>>
public boolean isSingleton()
isSingleton
in interface FactoryBean<Collection<Instantiator>>
public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader
in interface BeanClassLoaderAware
public void setCustomTypes(Map<Class<? extends DataSerializable>,Integer> types)
Instantiator
s.types
- map containing as keys the custom types and values the associated user ids.public void setGenerator(InstantiatorGenerator generator)
Instantiator
s.generator
- the generator 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)