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.| Constructor and Description |
|---|
HttpServletSession(javax.servlet.http.HttpSession httpSession,
String host) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(Object key) |
Collection<Object> |
getAttributeKeys() |
String |
getHost() |
Serializable |
getId() |
Date |
getLastAccessTime() |
Date |
getStartTimestamp() |
long |
getTimeout() |
Object |
removeAttribute(Object key) |
void |
setAttribute(Object key,
Object value) |
protected void |
setHost(String host) |
void |
setTimeout(long maxIdleTimeInMillis) |
void |
stop() |
void |
touch() |
public HttpServletSession(javax.servlet.http.HttpSession httpSession,
String host)
public Serializable getId()
getId in interface org.apache.shiro.session.Sessionpublic Date getStartTimestamp()
getStartTimestamp in interface org.apache.shiro.session.Sessionpublic Date getLastAccessTime()
getLastAccessTime in interface org.apache.shiro.session.Sessionpublic long getTimeout()
throws org.apache.shiro.session.InvalidSessionException
getTimeout in interface org.apache.shiro.session.Sessionorg.apache.shiro.session.InvalidSessionExceptionpublic void setTimeout(long maxIdleTimeInMillis)
throws org.apache.shiro.session.InvalidSessionException
setTimeout in interface org.apache.shiro.session.Sessionorg.apache.shiro.session.InvalidSessionExceptionprotected void setHost(String host)
public String getHost()
getHost in interface org.apache.shiro.session.Sessionpublic void touch()
throws org.apache.shiro.session.InvalidSessionException
touch in interface org.apache.shiro.session.Sessionorg.apache.shiro.session.InvalidSessionExceptionpublic void stop()
throws org.apache.shiro.session.InvalidSessionException
stop in interface org.apache.shiro.session.Sessionorg.apache.shiro.session.InvalidSessionExceptionpublic Collection<Object> getAttributeKeys() throws org.apache.shiro.session.InvalidSessionException
getAttributeKeys in interface org.apache.shiro.session.Sessionorg.apache.shiro.session.InvalidSessionExceptionpublic Object getAttribute(Object key) throws org.apache.shiro.session.InvalidSessionException
getAttribute in interface org.apache.shiro.session.Sessionorg.apache.shiro.session.InvalidSessionExceptionpublic void setAttribute(Object key, Object value) throws org.apache.shiro.session.InvalidSessionException
setAttribute in interface org.apache.shiro.session.Sessionorg.apache.shiro.session.InvalidSessionExceptionCopyright © 2004–2017 The Apache Software Foundation. All rights reserved.