Class AbstractSession

java.lang.Object
org.springframework.session.data.gemfire.support.AbstractSession
All Implemented Interfaces:
org.springframework.session.Session
Direct Known Subclasses:
SessionIdHolder

public class AbstractSession extends Object implements org.springframework.session.Session
Abstract base class for implementations of the Session interface in order to simplify the implementation of various Session types and their capabilities.
Since:
2.0.0
See Also:
  • Field Details

  • Constructor Details

    • AbstractSession

      public AbstractSession()
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface org.springframework.session.Session
    • setAttribute

      public void setAttribute(String attributeName, Object attributeValue)
      Specified by:
      setAttribute in interface org.springframework.session.Session
    • getAttribute

      public <T> T getAttribute(String attributeName)
      Specified by:
      getAttribute in interface org.springframework.session.Session
    • getAttributeOrDefault

      public <T> T getAttributeOrDefault(String name, T defaultValue)
      Specified by:
      getAttributeOrDefault in interface org.springframework.session.Session
    • getRequiredAttribute

      public <T> T getRequiredAttribute(String name)
      Specified by:
      getRequiredAttribute in interface org.springframework.session.Session
    • getAttributeNames

      public Set<String> getAttributeNames()
      Specified by:
      getAttributeNames in interface org.springframework.session.Session
    • isExpired

      public boolean isExpired()
      Specified by:
      isExpired in interface org.springframework.session.Session
    • getCreationTime

      public Instant getCreationTime()
      Specified by:
      getCreationTime in interface org.springframework.session.Session
    • setLastAccessedTime

      public void setLastAccessedTime(Instant lastAccessedTime)
      Specified by:
      setLastAccessedTime in interface org.springframework.session.Session
    • getLastAccessedTime

      public Instant getLastAccessedTime()
      Specified by:
      getLastAccessedTime in interface org.springframework.session.Session
    • setMaxInactiveInterval

      public void setMaxInactiveInterval(Duration interval)
      Specified by:
      setMaxInactiveInterval in interface org.springframework.session.Session
    • getMaxInactiveInterval

      public Duration getMaxInactiveInterval()
      Specified by:
      getMaxInactiveInterval in interface org.springframework.session.Session
    • changeSessionId

      public String changeSessionId()
      Specified by:
      changeSessionId in interface org.springframework.session.Session
    • removeAttribute

      public void removeAttribute(String attributeName)
      Specified by:
      removeAttribute in interface org.springframework.session.Session