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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
protected String
protected org.springframework.context.ApplicationContext
Returns a reference to the SpringApplicationContext
.protected ClassLoader
Returns a reference to theClassLoader
used by the Spring container to load beanclass types
.protected org.springframework.beans.factory.config.ConfigurableBeanFactory
Returns a reference to the Spring containerConfigurableBeanFactory
.protected org.springframework.core.env.Environment
Returns a reference to the configured SpringEnvironment
.protected org.slf4j.Logger
Return a reference to the configured SLF4JLogger
.protected String
protected String
protected String
protected String
protected <T> T
requireProperty
(String propertyName, Class<T> type) protected <T extends Enum<T>>
TresolveEnumeratedProperty
(String propertyName, Class<T> targetType, T defaultValue) protected Boolean
resolveProperty
(String propertyName, Boolean defaultValue) protected <T> T
resolveProperty
(String propertyName, Class<T> targetType) Attempts to resolve the property with the givenname
from the SpringEnvironment
.protected <T> T
resolveProperty
(String propertyName, Class<T> targetType, T defaultValue) Attempts to resolve the property with the givenname
from the SpringEnvironment
.protected Integer
resolveProperty
(String propertyName, Integer defaultValue) protected String
resolveProperty
(String propertyName, String defaultValue) protected String[]
resolveProperty
(String propertyName, String[] defaultValue) protected String
protected String
protected String
protected String
void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) Sets a reference the SpringApplicationContext
.void
setBeanClassLoader
(ClassLoader beanClassLoader) Sets a reference to theClassLoader
used by the Spring container to load beanclass types
.void
setEnvironment
(org.springframework.core.env.Environment environment) Sets a reference to the SpringEnvironment
.Methods inherited from class org.springframework.session.config.annotation.web.http.SpringHttpSessionConfiguration
afterPropertiesSet, sessionEventHttpSessionListenerAdapter, setCookieSerializer, setHttpSessionIdResolver, setHttpSessionListeners, setServletContext, springSessionRepositoryFilter
-
Field Details
-
SPRING_SESSION_PROPERTY_PREFIX
- See Also:
-
-
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 SpringApplicationContext
.- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Overrides:
setApplicationContext
in classorg.springframework.session.config.annotation.web.http.SpringHttpSessionConfiguration
- Parameters:
applicationContext
- reference to the SpringApplicationContext
.- 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 SpringApplicationContext
.- Returns:
- a reference to the Spring
ApplicationContext
. - Throws:
IllegalStateException
- ifApplicationContext
is null.- See Also:
-
ApplicationContext
-
setBeanClassLoader
Sets a reference to theClassLoader
used by the Spring container to load beanclass types
.- Specified by:
setBeanClassLoader
in interfaceorg.springframework.beans.factory.BeanClassLoaderAware
- Parameters:
beanClassLoader
-ClassLoader
used by the Spring container to load beanclass types
.- See Also:
-
BeanClassLoaderAware.setBeanClassLoader(ClassLoader)
ClassLoader
-
getBeanClassLoader
Returns a reference to theClassLoader
used by the Spring container to load beanclass types
.- Returns:
- the
ClassLoader
used by the Spring container to load beanclass types
. - See Also:
-
getBeanFactory
protected org.springframework.beans.factory.config.ConfigurableBeanFactory getBeanFactory()Returns a reference to the Spring containerConfigurableBeanFactory
.- Returns:
- a reference to the Spring container
ConfigurableBeanFactory
. - Throws:
IllegalStateException
- ifApplicationContext
is null.- See Also:
-
ConfigurableBeanFactory
getApplicationContext()
-
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment) Sets a reference to the SpringEnvironment
.- Specified by:
setEnvironment
in interfaceorg.springframework.context.EnvironmentAware
- Parameters:
environment
- SpringEnvironment
.- See Also:
-
Environment
-
getEnvironment
protected org.springframework.core.env.Environment getEnvironment()Returns a reference to the configured SpringEnvironment
.- Returns:
- a reference to the configured Spring
Environment
. - See Also:
-
Environment
-
getLogger
protected org.slf4j.Logger getLogger()Return a reference to the configured SLF4JLogger
.- Returns:
- a reference to the configured SLF4J
Logger
. - See Also:
-
Logger
-
clientRegionShortcutPropertyName
-
exposeConfigurationAsPropertiesPropertyName
-
indexableSessionAttributesPropertyName
-
indexedSessionAttributesPropertyName
-
maxInactiveIntervalInSecondsPropertyName
-
poolNamePropertyName
-
serverRegionShortcutPropertyName
-
sessionExpirationPolicyBeanNamePropertyName
-
sessionRegionNamePropertyName
-
sessionSerializerBeanNamePropertyName
-
requireProperty
Resolves the value for the given property identified byname
from the SpringEnvironment
as an instance of the specifiedtype
.- Type Parameters:
T
-Class
type of thepropertyName 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. ForString
values, this also means the value cannot beempty
. 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) -
resolveProperty
-
resolveProperty
-
resolveProperty
-
resolveProperty
-
resolveProperty
Attempts to resolve the property with the givenname
from the SpringEnvironment
. -
resolveProperty
Attempts to resolve the property with the givenname
from the SpringEnvironment
.- 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:
-