public class ShiroHttpSession extends Object implements javax.servlet.http.HttpSession
Session under the hood for all session operations instead of the
Servlet Container's session mechanism. This is required in heterogeneous client environments where the Session
is used on both the business tier as well as in multiple client technologies (web, swing, flash, etc) since
Servlet container sessions alone cannot support this feature.| Modifier and Type | Field and Description |
|---|---|
protected javax.servlet.http.HttpServletRequest |
currentRequest |
static String |
DEFAULT_SESSION_ID_NAME |
protected javax.servlet.ServletContext |
servletContext |
protected org.apache.shiro.session.Session |
session |
| Constructor and Description |
|---|
ShiroHttpSession(org.apache.shiro.session.Session session,
javax.servlet.http.HttpServletRequest currentRequest,
javax.servlet.ServletContext servletContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterBound(String s,
Object o) |
protected void |
afterUnbound(String s,
Object o) |
Object |
getAttribute(String s) |
Enumeration |
getAttributeNames() |
long |
getCreationTime() |
String |
getId() |
protected Set<String> |
getKeyNames() |
long |
getLastAccessedTime() |
int |
getMaxInactiveInterval() |
javax.servlet.ServletContext |
getServletContext() |
org.apache.shiro.session.Session |
getSession() |
javax.servlet.http.HttpSessionContext |
getSessionContext() |
Object |
getValue(String s) |
String[] |
getValueNames() |
void |
invalidate() |
boolean |
isNew() |
void |
putValue(String s,
Object o) |
void |
removeAttribute(String s) |
void |
removeValue(String s) |
void |
setAttribute(String s,
Object o) |
void |
setMaxInactiveInterval(int i) |
public static final String DEFAULT_SESSION_ID_NAME
protected javax.servlet.ServletContext servletContext
protected javax.servlet.http.HttpServletRequest currentRequest
protected org.apache.shiro.session.Session session
public ShiroHttpSession(org.apache.shiro.session.Session session,
javax.servlet.http.HttpServletRequest currentRequest,
javax.servlet.ServletContext servletContext)
public org.apache.shiro.session.Session getSession()
public long getCreationTime()
getCreationTime in interface javax.servlet.http.HttpSessionpublic String getId()
getId in interface javax.servlet.http.HttpSessionpublic long getLastAccessedTime()
getLastAccessedTime in interface javax.servlet.http.HttpSessionpublic javax.servlet.ServletContext getServletContext()
getServletContext in interface javax.servlet.http.HttpSessionpublic void setMaxInactiveInterval(int i)
setMaxInactiveInterval in interface javax.servlet.http.HttpSessionpublic int getMaxInactiveInterval()
getMaxInactiveInterval in interface javax.servlet.http.HttpSessionpublic javax.servlet.http.HttpSessionContext getSessionContext()
getSessionContext in interface javax.servlet.http.HttpSessionpublic Object getAttribute(String s)
getAttribute in interface javax.servlet.http.HttpSessionpublic Object getValue(String s)
getValue in interface javax.servlet.http.HttpSessionpublic Enumeration getAttributeNames()
getAttributeNames in interface javax.servlet.http.HttpSessionpublic String[] getValueNames()
getValueNames in interface javax.servlet.http.HttpSessionpublic void setAttribute(String s, Object o)
setAttribute in interface javax.servlet.http.HttpSessionpublic void putValue(String s, Object o)
putValue in interface javax.servlet.http.HttpSessionpublic void removeAttribute(String s)
removeAttribute in interface javax.servlet.http.HttpSessionpublic void removeValue(String s)
removeValue in interface javax.servlet.http.HttpSessionpublic void invalidate()
invalidate in interface javax.servlet.http.HttpSessionpublic boolean isNew()
isNew in interface javax.servlet.http.HttpSessionCopyright © 2004–2023 The Apache Software Foundation. All rights reserved.