public class SessionImpl extends Object implements Session
HttpSession.| Constructor and Description |
|---|
SessionImpl(HttpServletRequest request,
HttpSession session,
SessionLock lock) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(String name)
Returns the value previously stored in the session.
|
List<String> |
getAttributeNames()
Returns a list of the names of all attributes stored in the session.
|
List<String> |
getAttributeNames(String prefix)
Returns a list of the names of all attributes stored in the session whose name has the provided prefix.
|
int |
getMaxInactiveInterval()
Returns the maximum time interval, in seconds, that the servlet container will keep this session open between
client accesses.
|
void |
invalidate()
Invalidates this session then unbinds any objects bound to it.
|
boolean |
isInvalidated()
Checks to see if the session has been invalidated.
|
void |
restoreDirtyObjects()
Re-stores dirty objects back into the session.
|
void |
setAttribute(String name,
Object value)
Sets the value of an attribute.
|
void |
setMaxInactiveInterval(int seconds)
Specifies the time, in seconds, between client requests before the servlet container will invalidate this
session.
|
public SessionImpl(HttpServletRequest request, HttpSession session, SessionLock lock)
public Object getAttribute(String name)
SessiongetAttribute in interface Sessionpublic List<String> getAttributeNames()
SessiongetAttributeNames in interface Sessionpublic void setAttribute(String name, Object value)
SessionsetAttribute in interface Sessionpublic List<String> getAttributeNames(String prefix)
SessiongetAttributeNames in interface Sessionpublic int getMaxInactiveInterval()
SessiongetMaxInactiveInterval in interface Sessionpublic void invalidate()
Sessioninvalidate in interface Sessionpublic boolean isInvalidated()
SessionHttpSession.invalidate().isInvalidated in interface Sessionpublic void setMaxInactiveInterval(int seconds)
SessionsetMaxInactiveInterval in interface Sessionpublic void restoreDirtyObjects()
SessionrestoreDirtyObjects in interface SessionOptimizedSessionPersistedObject,
OptimizedSessionPersistedObjectAnalyzer,
ImmutableSessionPersistedObject5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.