public abstract class EmbeddedServiceConfigurationSupport extends Object implements ImportBeanDefinitionRegistrar, BeanFactoryAware
EmbeddedServiceConfigurationSupport class is an abstract base class supporting the configuration
of Pivotal GemFire and Apache Geode embedded services.BeanFactory,
BeanFactoryAware,
ImportBeanDefinitionRegistrar,
AbstractCacheConfiguration| Modifier and Type | Class and Description |
|---|---|
protected static class |
EmbeddedServiceConfigurationSupport.GemFirePropertiesBeanPostProcessor
Spring
BeanPostProcessor used to process GemFire System properties defined as a Spring bean
in the Spring application context before initialization. |
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_HOST |
static Integer |
DEFAULT_PORT |
| Constructor and Description |
|---|
EmbeddedServiceConfigurationSupport() |
| Modifier and Type | Method and Description |
|---|---|
protected <T extends AbstractCacheConfiguration> |
cacheConfiguration()
Returns a reference to an instance of the
AbstractCacheConfiguration class used to configure
a GemFire (Singleton, client or peer) cache instance along with it's associated, embedded services. |
protected String |
generateBeanName() |
protected String |
generateBeanName(Class<?> typeQualifier) |
protected String |
generateBeanName(String nameQualifier) |
protected Map<String,Object> |
getAnnotationAttributes(AnnotationMetadata importingClassMetadata) |
protected abstract Class |
getAnnotationType()
Returns the configured GemFire cache application annotation type
(e.g.
|
protected String |
getAnnotationTypeName()
Returns the fully-qualified class name of the GemFire cache application annotation type.
|
protected String |
getAnnotationTypeSimpleName()
Returns the simple class name of the GemFire cache application annotation type.
|
protected BeanFactory |
getBeanFactory()
Returns a reference to the Spring
BeanFactory. |
protected boolean |
hasProperties(Properties properties) |
protected boolean |
isAnnotationPresent(AnnotationMetadata importingClassMetadata) |
protected BeanDefinitionHolder |
newBeanDefinitionHolder(BeanDefinitionBuilder builder) |
void |
registerBeanDefinitions(AnnotationMetadata importingClassMetadata,
BeanDefinitionRegistry registry) |
protected void |
registerBeanDefinitions(AnnotationMetadata importingClassMetaData,
Map<String,Object> annotationAttributes,
BeanDefinitionRegistry registry) |
protected void |
registerGemFirePropertiesBeanPostProcessor(BeanDefinitionRegistry registry,
Properties customGemFireProperties) |
protected <T> T |
resolveBean(Class<T> beanType)
Resolves a Spring managed bean with the given
Class type from the Spring BeanFactory. |
protected String |
resolveHost(String hostname) |
protected String |
resolveHost(String hostname,
String defaultHostname) |
protected Integer |
resolvePort(Integer port) |
protected Integer |
resolvePort(Integer port,
Integer defaultPort) |
void |
setBeanFactory(BeanFactory beanFactory) |
protected void |
setGemFireProperties(AnnotationMetadata importingClassMetadata,
Map<String,Object> annotationAttributes,
BeanDefinitionRegistry registry) |
protected abstract Properties |
toGemFireProperties(Map<String,Object> annotationAttributes) |
public static final Integer DEFAULT_PORT
public static final String DEFAULT_HOST
protected <T extends AbstractCacheConfiguration> T cacheConfiguration()
AbstractCacheConfiguration class used to configure
a GemFire (Singleton, client or peer) cache instance along with it's associated, embedded services.T - Class type extension of AbstractCacheConfiguration.AbstractCacheConfiguration instance.IllegalStateException - if the AbstractCacheConfiguration reference was not configured.AbstractCacheConfigurationprotected abstract Class getAnnotationType()
ClientCacheApplication
or PeerCacheApplication.annotation defining the GemFire cache application type.protected String getAnnotationTypeName()
Class.getName(),
getAnnotationType()protected String getAnnotationTypeSimpleName()
Class.getSimpleName(),
getAnnotationType()public void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory in interface BeanFactoryAwareBeansExceptionprotected BeanFactory getBeanFactory()
BeanFactory.BeanFactory.IllegalStateException - if the Spring BeanFactory was not properly initialized.BeanFactorypublic final void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry)
registerBeanDefinitions in interface ImportBeanDefinitionRegistrarprotected void registerBeanDefinitions(AnnotationMetadata importingClassMetaData, Map<String,Object> annotationAttributes, BeanDefinitionRegistry registry)
protected void setGemFireProperties(AnnotationMetadata importingClassMetadata, Map<String,Object> annotationAttributes, BeanDefinitionRegistry registry)
protected abstract Properties toGemFireProperties(Map<String,Object> annotationAttributes)
protected boolean isAnnotationPresent(AnnotationMetadata importingClassMetadata)
protected boolean hasProperties(Properties properties)
protected Map<String,Object> getAnnotationAttributes(AnnotationMetadata importingClassMetadata)
protected void registerGemFirePropertiesBeanPostProcessor(BeanDefinitionRegistry registry, Properties customGemFireProperties)
protected BeanDefinitionHolder newBeanDefinitionHolder(BeanDefinitionBuilder builder)
protected String generateBeanName()
protected <T> T resolveBean(Class<T> beanType)
Class type from the Spring BeanFactory.
It is assumed that the given typed bean is the only bean of this Class type. If more than 1 bean
of the given Class type is found, then the Spring BeanFactory will throw
a NoUniqueBeanDefinitionException.
If the BeanFactory is an instance of AutowireCapableBeanFactory, then the returned bean
will also be configured.T - Class type of the registered Spring managed bean.beanType - required Class type of the registered Spring managed bean.Class type, or null
if no bean instance of the given, required Class type could be found.BeansException - if the Spring manage bean of the required Class type could not be resolved.getBeanFactory()Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.