public static class EntityHttpServletRequest.EntityHttpSession extends Object implements HttpSession
| Modifier and Type | Field and Description |
|---|---|
static String |
SESSION_COOKIE_NAME |
| Constructor and Description |
|---|
EntityHttpServletRequest.EntityHttpSession()
Create a new MockHttpSession with a default
MockServletContext. |
EntityHttpServletRequest.EntityHttpSession(ServletContext servletContext)
Create a new MockHttpSession.
|
EntityHttpServletRequest.EntityHttpSession(ServletContext servletContext,
String id)
Create a new MockHttpSession.
|
| Modifier and Type | Method and Description |
|---|---|
void |
access() |
void |
clearAttributes()
Clear all of this session's attributes.
|
void |
deserializeState(Serializable state)
Deserialize the attributes of this session from a state object
created by
serializeState(). |
Object |
getAttribute(String name) |
Enumeration |
getAttributeNames() |
long |
getCreationTime() |
String |
getId() |
long |
getLastAccessedTime() |
int |
getMaxInactiveInterval() |
ServletContext |
getServletContext() |
HttpSessionContext |
getSessionContext() |
Object |
getValue(String name) |
String[] |
getValueNames() |
void |
invalidate() |
boolean |
isInvalid() |
boolean |
isNew() |
void |
putValue(String name,
Object value) |
void |
removeAttribute(String name) |
void |
removeValue(String name) |
Serializable |
serializeState()
Serialize the attributes of this session into an object that can
be turned into a byte array with standard Java serialization.
|
void |
setAttribute(String name,
Object value) |
void |
setMaxInactiveInterval(int interval) |
void |
setNew(boolean value) |
public static final String SESSION_COOKIE_NAME
public EntityHttpServletRequest.EntityHttpSession()
MockServletContext.MockServletContextpublic EntityHttpServletRequest.EntityHttpSession(ServletContext servletContext)
servletContext - the ServletContext that the session runs inpublic EntityHttpServletRequest.EntityHttpSession(ServletContext servletContext, String id)
servletContext - the ServletContext that the session runs inid - a unique identifier for this sessionpublic long getCreationTime()
getCreationTime in interface HttpSessionpublic String getId()
getId in interface HttpSessionpublic void access()
public long getLastAccessedTime()
getLastAccessedTime in interface HttpSessionpublic ServletContext getServletContext()
getServletContext in interface HttpSessionpublic void setMaxInactiveInterval(int interval)
setMaxInactiveInterval in interface HttpSessionpublic int getMaxInactiveInterval()
getMaxInactiveInterval in interface HttpSessionpublic HttpSessionContext getSessionContext()
getSessionContext in interface HttpSessionpublic Object getAttribute(String name)
getAttribute in interface HttpSessionpublic Object getValue(String name)
getValue in interface HttpSessionpublic Enumeration getAttributeNames()
getAttributeNames in interface HttpSessionpublic String[] getValueNames()
getValueNames in interface HttpSessionpublic void setAttribute(String name, Object value)
setAttribute in interface HttpSessionpublic void putValue(String name, Object value)
putValue in interface HttpSessionpublic void removeAttribute(String name)
removeAttribute in interface HttpSessionpublic void removeValue(String name)
removeValue in interface HttpSessionpublic void clearAttributes()
public void invalidate()
invalidate in interface HttpSessionpublic boolean isInvalid()
public void setNew(boolean value)
public boolean isNew()
isNew in interface HttpSessionpublic Serializable serializeState()
public void deserializeState(Serializable state)
serializeState().state - a representation of this session's serialized stateCopyright © 2007-2014 CARET, University of Cambridge. All Rights Reserved.