|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wicket.protocol.http.MockHttpSession
public class MockHttpSession
Mock implementation of the WebSession
interface for use by
the test harnesses.
Constructor Summary | |
---|---|
MockHttpSession(javax.servlet.ServletContext context)
Create the session. |
Method Summary | |
---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Get the attribute with the given name. |
java.util.Enumeration |
getAttributeNames()
Get the names of the attributes in the session. |
long |
getCreationTime()
Get the creation time of the session. |
java.lang.String |
getId()
Return the id of this session. |
long |
getLastAccessedTime()
Get the time the session was last accessed. |
int |
getMaxInactiveInterval()
NOT USED. |
javax.servlet.ServletContext |
getServletContext()
Return the servlet context for the session. |
javax.servlet.http.HttpSessionContext |
getSessionContext()
Deprecated. |
java.lang.Object |
getValue(java.lang.String name)
Deprecated. use getAttribute(String) instead |
java.lang.String[] |
getValueNames()
Deprecated. use getAttributeNames() instead |
void |
invalidate()
Invalidate the session. |
boolean |
isNew()
Check if the session is new. |
void |
putValue(java.lang.String name,
java.lang.Object o)
Deprecated. Use setAttribute(String, Object) instead |
void |
removeAttribute(java.lang.String name)
Remove an attribute. |
void |
removeValue(java.lang.String name)
Deprecated. Use removeAttribute(String) instead |
void |
setAttribute(java.lang.String name,
java.lang.Object o)
Set an attribute. |
void |
setMaxInactiveInterval(int i)
NOT USED. |
void |
timestamp()
Set the last accessed time for the session. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockHttpSession(javax.servlet.ServletContext context)
context
- Method Detail |
---|
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface javax.servlet.http.HttpSession
name
- The attribute name
public java.util.Enumeration getAttributeNames()
getAttributeNames
in interface javax.servlet.http.HttpSession
public long getCreationTime()
getCreationTime
in interface javax.servlet.http.HttpSession
public java.lang.String getId()
getId
in interface javax.servlet.http.HttpSession
public long getLastAccessedTime()
getLastAccessedTime
in interface javax.servlet.http.HttpSession
public int getMaxInactiveInterval()
getMaxInactiveInterval
in interface javax.servlet.http.HttpSession
public javax.servlet.ServletContext getServletContext()
getServletContext
in interface javax.servlet.http.HttpSession
public javax.servlet.http.HttpSessionContext getSessionContext()
getSessionContext
in interface javax.servlet.http.HttpSession
public java.lang.Object getValue(java.lang.String name)
getValue
in interface javax.servlet.http.HttpSession
name
- The name
public java.lang.String[] getValueNames()
getValueNames
in interface javax.servlet.http.HttpSession
public void invalidate()
invalidate
in interface javax.servlet.http.HttpSession
public boolean isNew()
isNew
in interface javax.servlet.http.HttpSession
public void putValue(java.lang.String name, java.lang.Object o)
putValue
in interface javax.servlet.http.HttpSession
name
- The name of the valueo
- The valuepublic void removeAttribute(java.lang.String name)
removeAttribute
in interface javax.servlet.http.HttpSession
name
- The name of the attributepublic void removeValue(java.lang.String name)
removeValue
in interface javax.servlet.http.HttpSession
name
- The name of the valuepublic void setAttribute(java.lang.String name, java.lang.Object o)
setAttribute
in interface javax.servlet.http.HttpSession
name
- The name of the attribute to seto
- The value to setpublic void setMaxInactiveInterval(int i)
setMaxInactiveInterval
in interface javax.servlet.http.HttpSession
i
- The valuepublic void timestamp()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |