org.apache.shiro.web.session
Class HttpServletSession
java.lang.Object
org.apache.shiro.web.session.HttpServletSession
- All Implemented Interfaces:
- Session
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.
- Since:
- 1.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpServletSession
public HttpServletSession(javax.servlet.http.HttpSession httpSession,
String host)
getId
public Serializable getId()
- Specified by:
getId in interface Session
getStartTimestamp
public Date getStartTimestamp()
- Specified by:
getStartTimestamp in interface Session
getLastAccessTime
public Date getLastAccessTime()
- Specified by:
getLastAccessTime in interface Session
getTimeout
public long getTimeout()
throws InvalidSessionException
- Specified by:
getTimeout in interface Session
- Throws:
InvalidSessionException
setTimeout
public void setTimeout(long maxIdleTimeInMillis)
throws InvalidSessionException
- Specified by:
setTimeout in interface Session
- Throws:
InvalidSessionException
setHost
protected void setHost(String host)
getHost
public String getHost()
- Specified by:
getHost in interface Session
touch
public void touch()
throws InvalidSessionException
- Specified by:
touch in interface Session
- Throws:
InvalidSessionException
stop
public void stop()
throws InvalidSessionException
- Specified by:
stop in interface Session
- Throws:
InvalidSessionException
getAttributeKeys
public Collection<Object> getAttributeKeys()
throws InvalidSessionException
- Specified by:
getAttributeKeys in interface Session
- Throws:
InvalidSessionException
getAttribute
public Object getAttribute(Object key)
throws InvalidSessionException
- Specified by:
getAttribute in interface Session
- Throws:
InvalidSessionException
setAttribute
public void setAttribute(Object key,
Object value)
throws InvalidSessionException
- Specified by:
setAttribute in interface Session
- Throws:
InvalidSessionException
removeAttribute
public Object removeAttribute(Object key)
throws InvalidSessionException
- Specified by:
removeAttribute in interface Session
- Throws:
InvalidSessionException
Copyright © 2004-2015 The Apache Software Foundation. All Rights Reserved.