Class ClusterInfoPropertyPlaceholderConfigurer

java.lang.Object
org.springframework.core.io.support.PropertiesLoaderSupport
org.springframework.beans.factory.config.PropertyResourceConfigurer
org.springframework.beans.factory.config.PlaceholderConfigurerSupport
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
org.openspaces.core.cluster.ClusterInfoPropertyPlaceholderConfigurer
All Implemented Interfaces:
ClusterInfoAware, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.core.Ordered, org.springframework.core.PriorityOrdered

public class ClusterInfoPropertyPlaceholderConfigurer extends org.springframework.beans.factory.config.PropertyPlaceholderConfigurer implements org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.BeanFactoryAware, ClusterInfoAware
Provides the ClusterInfo parameters as injected properties that can be used within Spring application context. The following is a list of the properties:

If the cluster info parameter is not set (has null value) an empty string will be used.

Author:
kimchy
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     

    Fields inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer

    SYSTEM_PROPERTIES_MODE_FALLBACK, SYSTEM_PROPERTIES_MODE_NEVER, SYSTEM_PROPERTIES_MODE_OVERRIDE

    Fields inherited from class org.springframework.beans.factory.config.PlaceholderConfigurerSupport

    DEFAULT_ESCAPE_CHARACTER, DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, escapeCharacter, ignoreUnresolvablePlaceholders, nullValue, placeholderPrefix, placeholderSuffix, trimValues, valueSeparator

    Fields inherited from class org.springframework.core.io.support.PropertiesLoaderSupport

    localOverride, localProperties, logger

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
  • Method Summary

    Modifier and Type
    Method
    Description
    static Properties
     
    protected void
    processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess, Properties props)
     
    void
    setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
     
    void
    setBeanName(String beanName)
     
    void
    Sets the cluster information.

    Methods inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer

    resolvePlaceholder, resolvePlaceholder, resolveSystemProperty, setSearchSystemEnvironment, setSystemPropertiesMode, setSystemPropertiesModeName

    Methods inherited from class org.springframework.beans.factory.config.PlaceholderConfigurerSupport

    doProcessProperties, setEscapeCharacter, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setTrimValues, setValueSeparator

    Methods inherited from class org.springframework.beans.factory.config.PropertyResourceConfigurer

    convertProperties, convertProperty, convertPropertyValue, getOrder, postProcessBeanFactory, setOrder

    Methods inherited from class org.springframework.core.io.support.PropertiesLoaderSupport

    loadProperties, mergeProperties, setFileEncoding, setIgnoreResourceNotFound, setLocalOverride, setLocation, setLocations, setProperties, setPropertiesArray, setPropertiesPersister

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ClusterInfoPropertyPlaceholderConfigurer

      public ClusterInfoPropertyPlaceholderConfigurer()
    • ClusterInfoPropertyPlaceholderConfigurer

      public ClusterInfoPropertyPlaceholderConfigurer(ClusterInfo clusterInfo)
  • Method Details

    • createProperties

      public static Properties createProperties(ClusterInfo clusterInfo)
    • setClusterInfo

      public void setClusterInfo(ClusterInfo clusterInfo)
      Description copied from interface: ClusterInfoAware
      Sets the cluster information.

      Note, the cluster information is obtained externally from the application context which means that this feature need to be supported by specific containers (and is not supported by plain Spring application context). This means that beans that implement ClusterInfoAware should take into account the fact that the cluster info provided might be null.

      Specified by:
      setClusterInfo in interface ClusterInfoAware
      Parameters:
      clusterInfo - The cluster information to be injected
    • setBeanName

      public void setBeanName(String beanName)
      Specified by:
      setBeanName in interface org.springframework.beans.factory.BeanNameAware
      Overrides:
      setBeanName in class org.springframework.beans.factory.config.PlaceholderConfigurerSupport
    • setBeanFactory

      public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
      Overrides:
      setBeanFactory in class org.springframework.beans.factory.config.PlaceholderConfigurerSupport
    • processProperties

      protected void processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess, Properties props) throws org.springframework.beans.BeansException
      Overrides:
      processProperties in class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
      Throws:
      org.springframework.beans.BeansException