public abstract class AbstractGemFireHttpSessionConfiguration
extends org.springframework.session.config.annotation.web.http.SpringHttpSessionConfiguration
implements org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.context.EnvironmentAware
AbstractGemFireHttpSessionConfiguration
class is an abstract base class containing configuration logic
common to Apache Geode and Pivotal GemFire in order to manage HttpSession
state.ClassLoader
,
BeanClassLoaderAware
,
ConfigurableBeanFactory
,
ApplicationContext
,
ConfigurableApplicationContext
,
EnvironmentAware
,
Environment
,
SpringHttpSessionConfiguration
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
SPRING_SESSION_PROPERTY_PREFIX |
Constructor and Description |
---|
AbstractGemFireHttpSessionConfiguration() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
clientRegionShortcutPropertyName() |
protected java.lang.String |
exposeConfigurationAsPropertiesPropertyName() |
protected org.springframework.context.ApplicationContext |
getApplicationContext()
Returns a reference to the Spring
ApplicationContext . |
protected java.lang.ClassLoader |
getBeanClassLoader()
Returns a reference to the
ClassLoader used by the Spring container to load bean
class types . |
protected org.springframework.beans.factory.config.ConfigurableBeanFactory |
getBeanFactory()
Returns a reference to the Spring container
ConfigurableBeanFactory . |
protected org.springframework.core.env.Environment |
getEnvironment()
Returns a reference to the configured Spring
Environment . |
protected org.slf4j.Logger |
getLogger()
Return a reference to the configured SLF4J
Logger . |
protected java.lang.String |
indexableSessionAttributesPropertyName() |
protected java.lang.String |
indexedSessionAttributesPropertyName() |
protected java.lang.String |
maxInactiveIntervalInSecondsPropertyName() |
protected java.lang.String |
poolNamePropertyName() |
protected <T> T |
requireProperty(java.lang.String propertyName,
java.lang.Class<T> type)
Resolves the value for the given property identified by
name from the Spring Environment
as an instance of the specified type . |
protected <T extends java.lang.Enum<T>> |
resolveEnumeratedProperty(java.lang.String propertyName,
java.lang.Class<T> targetType,
T defaultValue)
Attempts to resolve the property with the given
name from the Spring Environment
as an Enum . |
protected java.lang.Boolean |
resolveProperty(java.lang.String propertyName,
java.lang.Boolean defaultValue)
Attempts to resolve the property with the given
name from the Spring Environment
as an Boolean . |
protected <T> T |
resolveProperty(java.lang.String propertyName,
java.lang.Class<T> targetType)
Attempts to resolve the property with the given
name from the Spring Environment . |
protected <T> T |
resolveProperty(java.lang.String propertyName,
java.lang.Class<T> targetType,
T defaultValue)
Attempts to resolve the property with the given
name from the Spring Environment . |
protected java.lang.Integer |
resolveProperty(java.lang.String propertyName,
java.lang.Integer defaultValue)
Attempts to resolve the property with the given
name from the Spring Environment
as an Integer . |
protected java.lang.String |
resolveProperty(java.lang.String propertyName,
java.lang.String defaultValue)
Attempts to resolve the property with the given
name from the Spring Environment
as a String . |
protected java.lang.String[] |
resolveProperty(java.lang.String propertyName,
java.lang.String[] defaultValue)
Attempts to resolve the property with the given
name from the Spring Environment
as a String array. |
protected java.lang.String |
serverRegionShortcutPropertyName() |
protected java.lang.String |
sessionExpirationPolicyBeanNamePropertyName() |
protected java.lang.String |
sessionRegionNamePropertyName() |
protected java.lang.String |
sessionSerializerBeanNamePropertyName() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Sets a reference the Spring
ApplicationContext . |
void |
setBeanClassLoader(java.lang.ClassLoader beanClassLoader)
Sets a reference to the
ClassLoader used by the Spring container to load bean class types . |
void |
setEnvironment(org.springframework.core.env.Environment environment)
Sets a reference to the Spring
Environment . |
protected static final java.lang.String SPRING_SESSION_PROPERTY_PREFIX
public AbstractGemFireHttpSessionConfiguration()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
ApplicationContext
.setApplicationContext
in interface org.springframework.context.ApplicationContextAware
setApplicationContext
in class org.springframework.session.config.annotation.web.http.SpringHttpSessionConfiguration
applicationContext
- reference to the Spring ApplicationContext
.org.springframework.beans.BeansException
- if the reference cannot be stored.ApplicationContext
protected org.springframework.context.ApplicationContext getApplicationContext()
ApplicationContext
.ApplicationContext
.java.lang.IllegalStateException
- if ApplicationContext
is null.ApplicationContext
public void setBeanClassLoader(java.lang.ClassLoader beanClassLoader)
ClassLoader
used by the Spring container to load bean class types
.setBeanClassLoader
in interface org.springframework.beans.factory.BeanClassLoaderAware
beanClassLoader
- ClassLoader
used by the Spring container to load bean class types
.BeanClassLoaderAware.setBeanClassLoader(ClassLoader)
,
ClassLoader
protected java.lang.ClassLoader getBeanClassLoader()
ClassLoader
used by the Spring container to load bean
class types
.ClassLoader
used by the Spring container to load bean class types
.ClassLoader
protected org.springframework.beans.factory.config.ConfigurableBeanFactory getBeanFactory()
ConfigurableBeanFactory
.ConfigurableBeanFactory
.java.lang.IllegalStateException
- if ApplicationContext
is null.ConfigurableBeanFactory
,
getApplicationContext()
public void setEnvironment(org.springframework.core.env.Environment environment)
Environment
.setEnvironment
in interface org.springframework.context.EnvironmentAware
environment
- Spring Environment
.Environment
protected org.springframework.core.env.Environment getEnvironment()
Environment
.Environment
.Environment
protected org.slf4j.Logger getLogger()
Logger
.Logger
.Logger
protected java.lang.String clientRegionShortcutPropertyName()
protected java.lang.String exposeConfigurationAsPropertiesPropertyName()
protected java.lang.String indexableSessionAttributesPropertyName()
protected java.lang.String indexedSessionAttributesPropertyName()
protected java.lang.String maxInactiveIntervalInSecondsPropertyName()
protected java.lang.String poolNamePropertyName()
protected java.lang.String serverRegionShortcutPropertyName()
protected java.lang.String sessionExpirationPolicyBeanNamePropertyName()
protected java.lang.String sessionRegionNamePropertyName()
protected java.lang.String sessionSerializerBeanNamePropertyName()
protected <T> T requireProperty(java.lang.String propertyName, java.lang.Class<T> type)
name
from the Spring Environment
as an instance of the specified type
.T
- Class
type of the propertyName property's
assigned value.propertyName
- String
containing the name of the required property to resolve.type
- Class
type of the property's assigned value.named
property.java.lang.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.resolveProperty(String, Class, Object)
protected <T extends java.lang.Enum<T>> T resolveEnumeratedProperty(java.lang.String propertyName, java.lang.Class<T> targetType, T defaultValue)
name
from the Spring Environment
as an Enum
.propertyName
- name
of the property to resolve.defaultValue
- default value to return if the property is not defined or not set.name
or default value if the property
is not defined or not set.resolveProperty(String, Class, Object)
,
Enum
protected java.lang.Boolean resolveProperty(java.lang.String propertyName, java.lang.Boolean defaultValue)
name
from the Spring Environment
as an Boolean
.propertyName
- name
of the property to resolve.defaultValue
- default value to return if the property is not defined or not set.name
or the default value
if the property is not defined or not set.resolveProperty(String, Class, Object)
,
Boolean
protected java.lang.Integer resolveProperty(java.lang.String propertyName, java.lang.Integer defaultValue)
name
from the Spring Environment
as an Integer
.propertyName
- name
of the property to resolve.defaultValue
- default value to return if the property is not defined or not set.name
or the default value
if the property is not defined or not set.resolveProperty(String, Class, Object)
,
Integer
protected java.lang.String resolveProperty(java.lang.String propertyName, java.lang.String defaultValue)
name
from the Spring Environment
as a String
.propertyName
- name
of the property to resolve.defaultValue
- default value to return if the property is not defined or not set.name
or the default value
if the property is not defined or not set.resolveProperty(String, Class, Object)
,
String
protected java.lang.String[] resolveProperty(java.lang.String propertyName, java.lang.String[] defaultValue)
name
from the Spring Environment
as a String
array.propertyName
- name
of the property to resolve.defaultValue
- default value to return if the property is not defined or not set.name
or the default value
if the property is not defined or not set.resolveProperty(String, Class, Object)
,
String
protected <T> T resolveProperty(java.lang.String propertyName, java.lang.Class<T> targetType)
name
from the Spring Environment
.T
- type
of the property value.propertyName
- name
of the property to resolve.targetType
- type
of the property's value.value
of the property identified by name
or null if the property is not defined or not set.resolveProperty(String, Class, Object)
protected <T> T resolveProperty(java.lang.String propertyName, java.lang.Class<T> targetType, T defaultValue)
name
from the Spring Environment
.T
- Class
type of the property value.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.name
or default value if the property
is not defined or not set.getEnvironment()