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)
Session
getAttribute
in interface Session
public List<String> getAttributeNames()
Session
getAttributeNames
in interface Session
public void setAttribute(String name, Object value)
Session
setAttribute
in interface Session
public List<String> getAttributeNames(String prefix)
Session
getAttributeNames
in interface Session
public int getMaxInactiveInterval()
Session
getMaxInactiveInterval
in interface Session
public void invalidate()
Session
invalidate
in interface Session
public boolean isInvalidated()
Session
HttpSession.invalidate()
.isInvalidated
in interface Session
public void setMaxInactiveInterval(int seconds)
Session
setMaxInactiveInterval
in interface Session
public void restoreDirtyObjects()
Session
restoreDirtyObjects
in interface Session
OptimizedSessionPersistedObject
,
OptimizedSessionPersistedObjectAnalyzer
,
ImmutableSessionPersistedObject
${project.version} - Copyright © 2003-2015 The Apache Software Foundation.