java.lang.Object | |
↳ | org.springframework.mock.web.MockHttpSession |
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.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | SESSION_COOKIE_NAME |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new MockHttpSession with a default
MockServletContext . | |||||||||||
Create a new MockHttpSession.
| |||||||||||
Create a new MockHttpSession.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clear all of this session's attributes.
| |||||||||||
Deserialize the attributes of this session from a state object created by
serializeState() . | |||||||||||
Serialize the attributes of this session into an object that can be
turned into a byte array with standard Java serialization.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
javax.servlet.http.HttpSession
|
Create a new MockHttpSession.
servletContext | the ServletContext that the session runs in |
---|
Create a new MockHttpSession.
servletContext | the ServletContext that the session runs in |
---|---|
id | a unique identifier for this session |
Clear all of this session's attributes.
Deserialize the attributes of this session from a state object created by
serializeState()
.
state | a representation of this session's serialized state |
---|
Serialize the attributes of this session into an object that can be turned into a byte array with standard Java serialization.