| |
|
| java.lang.Object org.springframework.mock.web.MockHttpSession
MockHttpSession | public class MockHttpSession implements HttpSession(Code) | | Mock implementation of the
javax.servlet.http.HttpSession interface.
Supports the Servlet 2.4 API level.
Used for testing the web framework; also useful for testing
application controllers.
author: Juergen Hoeller author: Rod Johnson since: 1.0.2 |
SESSION_COOKIE_NAME | final public static String SESSION_COOKIE_NAME(Code) | | |
MockHttpSession | public MockHttpSession(ServletContext servletContext)(Code) | | Create a new MockHttpSession.
Parameters: servletContext - the ServletContext that the session runs in |
access | public void access()(Code) | | |
clearAttributes | public void clearAttributes()(Code) | | Clear all of this session's attributes.
|
deserializeState | public void deserializeState(Serializable state)(Code) | | Deserialize the attributes of this session from a state object
created by
MockHttpSession.serializeState() .
Parameters: state - a representation of this session's serialized state |
getCreationTime | public long getCreationTime()(Code) | | |
getLastAccessedTime | public long getLastAccessedTime()(Code) | | |
getMaxInactiveInterval | public int getMaxInactiveInterval()(Code) | | |
invalidate | public void invalidate()(Code) | | |
isInvalid | public boolean isInvalid()(Code) | | |
isNew | public boolean isNew()(Code) | | |
removeAttribute | public void removeAttribute(String name)(Code) | | |
serializeState | public Serializable serializeState()(Code) | | Serialize the attributes of this session into an object that can
be turned into a byte array with standard Java serialization.
a representation of this session's serialized state |
setMaxInactiveInterval | public void setMaxInactiveInterval(int interval)(Code) | | |
setNew | public void setNew(boolean value)(Code) | | |
|
|
|