Class HttpServletSession

  • All Implemented Interfaces:
    org.apache.shiro.session.Session

    public class HttpServletSession
    extends Object
    implements org.apache.shiro.session.Session
    Session implementation that is backed entirely by a standard servlet container HttpSession instance. It does not interact with any of Shiro's session-related components SessionManager, SecurityManager, etc, and instead satisfies all method implementations by interacting with a servlet container provided HttpSession instance.
    Since:
    1.0
    • Method Detail

      • getId

        public Serializable getId()
        Specified by:
        getId in interface org.apache.shiro.session.Session
      • getStartTimestamp

        public Date getStartTimestamp()
        Specified by:
        getStartTimestamp in interface org.apache.shiro.session.Session
      • getLastAccessTime

        public Date getLastAccessTime()
        Specified by:
        getLastAccessTime in interface org.apache.shiro.session.Session
      • getTimeout

        public long getTimeout()
                        throws org.apache.shiro.session.InvalidSessionException
        Specified by:
        getTimeout in interface org.apache.shiro.session.Session
        Throws:
        org.apache.shiro.session.InvalidSessionException
      • setTimeout

        public void setTimeout​(long maxIdleTimeInMillis)
                        throws org.apache.shiro.session.InvalidSessionException
        Specified by:
        setTimeout in interface org.apache.shiro.session.Session
        Throws:
        org.apache.shiro.session.InvalidSessionException
      • getHost

        public String getHost()
        Specified by:
        getHost in interface org.apache.shiro.session.Session
      • touch

        public void touch()
                   throws org.apache.shiro.session.InvalidSessionException
        Specified by:
        touch in interface org.apache.shiro.session.Session
        Throws:
        org.apache.shiro.session.InvalidSessionException
      • stop

        public void stop()
                  throws org.apache.shiro.session.InvalidSessionException
        Specified by:
        stop in interface org.apache.shiro.session.Session
        Throws:
        org.apache.shiro.session.InvalidSessionException
      • getAttributeKeys

        public Collection<ObjectgetAttributeKeys()
                                            throws org.apache.shiro.session.InvalidSessionException
        Specified by:
        getAttributeKeys in interface org.apache.shiro.session.Session
        Throws:
        org.apache.shiro.session.InvalidSessionException
      • getAttribute

        public Object getAttribute​(Object key)
                            throws org.apache.shiro.session.InvalidSessionException
        Specified by:
        getAttribute in interface org.apache.shiro.session.Session
        Throws:
        org.apache.shiro.session.InvalidSessionException
      • setAttribute

        public void setAttribute​(Object key,
                                 Object value)
                          throws org.apache.shiro.session.InvalidSessionException
        Specified by:
        setAttribute in interface org.apache.shiro.session.Session
        Throws:
        org.apache.shiro.session.InvalidSessionException
      • removeAttribute

        public Object removeAttribute​(Object key)
                               throws org.apache.shiro.session.InvalidSessionException
        Specified by:
        removeAttribute in interface org.apache.shiro.session.Session
        Throws:
        org.apache.shiro.session.InvalidSessionException