public class HttpServletSession extends Object implements 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()
public Date getStartTimestamp()
getStartTimestamp in interface Sessionpublic Date getLastAccessTime()
getLastAccessTime in interface Sessionpublic long getTimeout()
throws InvalidSessionException
getTimeout in interface SessionInvalidSessionExceptionpublic void setTimeout(long maxIdleTimeInMillis)
throws InvalidSessionException
setTimeout in interface SessionInvalidSessionExceptionprotected void setHost(String host)
public void touch()
throws InvalidSessionException
touch in interface SessionInvalidSessionExceptionpublic void stop()
throws InvalidSessionException
stop in interface SessionInvalidSessionExceptionpublic Collection<Object> getAttributeKeys() throws InvalidSessionException
getAttributeKeys in interface SessionInvalidSessionExceptionpublic Object getAttribute(Object key) throws InvalidSessionException
getAttribute in interface SessionInvalidSessionExceptionpublic void setAttribute(Object key, Object value) throws InvalidSessionException
setAttribute in interface SessionInvalidSessionExceptionpublic Object removeAttribute(Object key) throws InvalidSessionException
removeAttribute in interface SessionInvalidSessionExceptionCopyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.