Class AbstractGemFireHttpSessionConfiguration

java.lang.Object
org.springframework.session.config.annotation.web.http.SpringHttpSessionConfiguration
org.springframework.session.data.gemfire.config.annotation.web.http.AbstractGemFireHttpSessionConfiguration
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.EnvironmentAware
Direct Known Subclasses:
GemFireHttpSessionConfiguration

public abstract class AbstractGemFireHttpSessionConfiguration extends org.springframework.session.config.annotation.web.http.SpringHttpSessionConfiguration implements org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.context.EnvironmentAware
The AbstractGemFireHttpSessionConfiguration class is an abstract base class containing configuration logic common to Apache Geode and Pivotal GemFire in order to manage HttpSession state.
Since:
2.0.4
See Also:
  • ClassLoader
  • BeanClassLoaderAware
  • ConfigurableBeanFactory
  • ApplicationContext
  • ConfigurableApplicationContext
  • EnvironmentAware
  • Environment
  • SpringHttpSessionConfiguration
  • Field Details

  • Constructor Details

    • AbstractGemFireHttpSessionConfiguration

      public AbstractGemFireHttpSessionConfiguration()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Sets a reference the Spring ApplicationContext.
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Overrides:
      setApplicationContext in class org.springframework.session.config.annotation.web.http.SpringHttpSessionConfiguration
      Parameters:
      applicationContext - reference to the Spring ApplicationContext.
      Throws:
      org.springframework.beans.BeansException - if the reference cannot be stored.
      See Also:
      • ApplicationContext
    • getApplicationContext

      protected org.springframework.context.ApplicationContext getApplicationContext()
      Returns a reference to the Spring ApplicationContext.
      Returns:
      a reference to the Spring ApplicationContext.
      Throws:
      IllegalStateException - if ApplicationContext is null.
      See Also:
      • ApplicationContext
    • setBeanClassLoader

      public void setBeanClassLoader(ClassLoader beanClassLoader)
      Sets a reference to the ClassLoader used by the Spring container to load bean class types.
      Specified by:
      setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAware
      Parameters:
      beanClassLoader - ClassLoader used by the Spring container to load bean class types.
      See Also:
      • BeanClassLoaderAware.setBeanClassLoader(ClassLoader)
      • ClassLoader
    • getBeanClassLoader

      protected ClassLoader getBeanClassLoader()
      Returns a reference to the ClassLoader used by the Spring container to load bean class types.
      Returns:
      the ClassLoader used by the Spring container to load bean class types.
      See Also:
    • getBeanFactory

      protected org.springframework.beans.factory.config.ConfigurableBeanFactory getBeanFactory()
      Returns a reference to the Spring container ConfigurableBeanFactory.
      Returns:
      a reference to the Spring container ConfigurableBeanFactory.
      Throws:
      IllegalStateException - if ApplicationContext is null.
      See Also:
    • setEnvironment

      public void setEnvironment(org.springframework.core.env.Environment environment)
      Sets a reference to the Spring Environment.
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware
      Parameters:
      environment - Spring Environment.
      See Also:
      • Environment
    • getEnvironment

      protected org.springframework.core.env.Environment getEnvironment()
      Returns a reference to the configured Spring Environment.
      Returns:
      a reference to the configured Spring Environment.
      See Also:
      • Environment
    • getLogger

      protected org.slf4j.Logger getLogger()
      Return a reference to the configured SLF4J Logger.
      Returns:
      a reference to the configured SLF4J Logger.
      See Also:
      • Logger
    • clientRegionShortcutPropertyName

      protected String clientRegionShortcutPropertyName()
    • exposeConfigurationAsPropertiesPropertyName

      protected String exposeConfigurationAsPropertiesPropertyName()
    • indexableSessionAttributesPropertyName

      protected String indexableSessionAttributesPropertyName()
    • indexedSessionAttributesPropertyName

      protected String indexedSessionAttributesPropertyName()
    • maxInactiveIntervalInSecondsPropertyName

      protected String maxInactiveIntervalInSecondsPropertyName()
    • poolNamePropertyName

      protected String poolNamePropertyName()
    • serverRegionShortcutPropertyName

      protected String serverRegionShortcutPropertyName()
    • sessionExpirationPolicyBeanNamePropertyName

      protected String sessionExpirationPolicyBeanNamePropertyName()
    • sessionRegionNamePropertyName

      protected String sessionRegionNamePropertyName()
    • sessionSerializerBeanNamePropertyName

      protected String sessionSerializerBeanNamePropertyName()
    • requireProperty

      protected <T> T requireProperty(String propertyName, Class<T> type)
      Resolves the value for the given property identified by name from the Spring Environment as an instance of the specified type.
      Type Parameters:
      T - Class type of the propertyName property's assigned value.
      Parameters:
      propertyName - String containing the name of the required property to resolve.
      type - Class type of the property's assigned value.
      Returns:
      the assigned value of the named property.
      Throws:
      IllegalStateException - if the property has not been assigned a value. For String values, this also means the value cannot be empty. For non-String values, this means the value must not be null.
      See Also:
    • resolveEnumeratedProperty

      protected <T extends Enum<T>> T resolveEnumeratedProperty(String propertyName, Class<T> targetType, T defaultValue)
      Attempts to resolve the property with the given name from the Spring Environment as an Enum.
      Parameters:
      propertyName - name of the property to resolve.
      defaultValue - default value to return if the property is not defined or not set.
      Returns:
      the value of the property identified by name or default value if the property is not defined or not set.
      See Also:
    • resolveProperty

      protected Boolean resolveProperty(String propertyName, Boolean defaultValue)
      Attempts to resolve the property with the given name from the Spring Environment as an Boolean.
      Parameters:
      propertyName - name of the property to resolve.
      defaultValue - default value to return if the property is not defined or not set.
      Returns:
      the value of the property identified by name or the default value if the property is not defined or not set.
      See Also:
    • resolveProperty

      protected Integer resolveProperty(String propertyName, Integer defaultValue)
      Attempts to resolve the property with the given name from the Spring Environment as an Integer.
      Parameters:
      propertyName - name of the property to resolve.
      defaultValue - default value to return if the property is not defined or not set.
      Returns:
      the value of the property identified by name or the default value if the property is not defined or not set.
      See Also:
    • resolveProperty

      protected String resolveProperty(String propertyName, String defaultValue)
      Attempts to resolve the property with the given name from the Spring Environment as a String.
      Parameters:
      propertyName - name of the property to resolve.
      defaultValue - default value to return if the property is not defined or not set.
      Returns:
      the value of the property identified by name or the default value if the property is not defined or not set.
      See Also:
    • resolveProperty

      protected String[] resolveProperty(String propertyName, String[] defaultValue)
      Attempts to resolve the property with the given name from the Spring Environment as a String array.
      Parameters:
      propertyName - name of the property to resolve.
      defaultValue - default value to return if the property is not defined or not set.
      Returns:
      the value of the property identified by name or the default value if the property is not defined or not set.
      See Also:
    • resolveProperty

      protected <T> T resolveProperty(String propertyName, Class<T> targetType)
      Attempts to resolve the property with the given name from the Spring Environment.
      Type Parameters:
      T - type of the property value.
      Parameters:
      propertyName - name of the property to resolve.
      targetType - type of the property's value.
      Returns:
      the value of the property identified by name or null if the property is not defined or not set.
      See Also:
    • resolveProperty

      protected <T> T resolveProperty(String propertyName, Class<T> targetType, T defaultValue)
      Attempts to resolve the property with the given name from the Spring Environment.
      Type Parameters:
      T - Class type of the property value.
      Parameters:
      propertyName - name of the property to resolve.
      targetType - Class type of the property's value.
      defaultValue - default value to return if the property is not defined or not set.
      Returns:
      the value of the property identified by name or default value if the property is not defined or not set.
      See Also: