public class ShiroHttpSession extends Object implements 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 HttpServletRequest |
currentRequest |
static String |
DEFAULT_SESSION_ID_NAME |
protected ServletContext |
servletContext |
protected Session |
session |
Constructor and Description |
---|
ShiroHttpSession(Session session,
HttpServletRequest currentRequest,
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() |
ServletContext |
getServletContext() |
Session |
getSession() |
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 ServletContext servletContext
protected HttpServletRequest currentRequest
public ShiroHttpSession(Session session, HttpServletRequest currentRequest, ServletContext servletContext)
public Session getSession()
public long getCreationTime()
getCreationTime
in interface HttpSession
public String getId()
getId
in interface HttpSession
public long getLastAccessedTime()
getLastAccessedTime
in interface HttpSession
public ServletContext getServletContext()
getServletContext
in interface HttpSession
public void setMaxInactiveInterval(int i)
setMaxInactiveInterval
in interface HttpSession
public int getMaxInactiveInterval()
getMaxInactiveInterval
in interface HttpSession
public HttpSessionContext getSessionContext()
getSessionContext
in interface HttpSession
public Object getAttribute(String s)
getAttribute
in interface HttpSession
public Object getValue(String s)
getValue
in interface HttpSession
protected Set<String> getKeyNames()
public Enumeration getAttributeNames()
getAttributeNames
in interface HttpSession
public String[] getValueNames()
getValueNames
in interface HttpSession
protected void afterBound(String s, Object o)
protected void afterUnbound(String s, Object o)
public void setAttribute(String s, Object o)
setAttribute
in interface HttpSession
public void putValue(String s, Object o)
putValue
in interface HttpSession
public void removeAttribute(String s)
removeAttribute
in interface HttpSession
public void removeValue(String s)
removeValue
in interface HttpSession
public void invalidate()
invalidate
in interface HttpSession
public boolean isNew()
isNew
in interface HttpSession
Copyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.