|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.myfaces.test.mock.MockHttpSession
public class MockHttpSession
Mock implementation of HttpSession.
| Constructor Summary | |
|---|---|
MockHttpSession()
Configure a default instance. |
|
MockHttpSession(javax.servlet.ServletContext servletContext)
Configure a session instance associated with the specified servlet context. |
|
| Method Summary | |
|---|---|
void |
addAttributeListener(javax.servlet.http.HttpSessionAttributeListener listener)
Add a new listener instance that should be notified about attribute changes. |
Object |
getAttribute(String name)
|
Enumeration |
getAttributeNames()
|
long |
getCreationTime()
|
String |
getId()
|
long |
getLastAccessedTime()
|
int |
getMaxInactiveInterval()
|
javax.servlet.ServletContext |
getServletContext()
|
javax.servlet.http.HttpSessionContext |
getSessionContext()
|
Object |
getValue(String name)
|
String[] |
getValueNames()
|
protected MockWebContainer |
getWebContainer()
|
void |
invalidate()
|
boolean |
isNew()
|
void |
putValue(String name,
Object value)
|
void |
removeAttribute(String name)
|
void |
removeValue(String name)
|
void |
setAttribute(String name,
Object value)
|
void |
setId(String id)
Set the session identifier of this session. |
void |
setMaxInactiveInterval(int interval)
|
void |
setServletContext(javax.servlet.ServletContext servletContext)
Set the ServletContext associated with this session. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockHttpSession()
Configure a default instance.
public MockHttpSession(javax.servlet.ServletContext servletContext)
Configure a session instance associated with the specified servlet context.
servletContext - The associated servlet context| Method Detail |
|---|
public void addAttributeListener(javax.servlet.http.HttpSessionAttributeListener listener)
Add a new listener instance that should be notified about attribute changes.
listener - The new listener to be addedpublic void setServletContext(javax.servlet.ServletContext servletContext)
Set the ServletContext associated with this session.
servletContext - The associated servlet contextprotected MockWebContainer getWebContainer()
public void setId(String id)
Set the session identifier of this session.
id - The new session identifierpublic Object getAttribute(String name)
getAttribute in interface javax.servlet.http.HttpSessionpublic Enumeration getAttributeNames()
getAttributeNames in interface javax.servlet.http.HttpSessionpublic long getCreationTime()
getCreationTime in interface javax.servlet.http.HttpSessionpublic String getId()
getId in interface javax.servlet.http.HttpSessionpublic long getLastAccessedTime()
getLastAccessedTime in interface javax.servlet.http.HttpSessionpublic int getMaxInactiveInterval()
getMaxInactiveInterval in interface javax.servlet.http.HttpSessionpublic javax.servlet.ServletContext getServletContext()
getServletContext in interface javax.servlet.http.HttpSessionpublic javax.servlet.http.HttpSessionContext getSessionContext()
getSessionContext in interface javax.servlet.http.HttpSessionpublic Object getValue(String name)
getValue in interface javax.servlet.http.HttpSessionpublic String[] getValueNames()
getValueNames in interface javax.servlet.http.HttpSessionpublic void invalidate()
invalidate in interface javax.servlet.http.HttpSessionpublic boolean isNew()
isNew in interface javax.servlet.http.HttpSession
public void putValue(String name,
Object value)
putValue in interface javax.servlet.http.HttpSessionpublic void removeAttribute(String name)
removeAttribute in interface javax.servlet.http.HttpSessionpublic void removeValue(String name)
removeValue in interface javax.servlet.http.HttpSession
public void setAttribute(String name,
Object value)
setAttribute in interface javax.servlet.http.HttpSessionpublic void setMaxInactiveInterval(int interval)
setMaxInactiveInterval in interface javax.servlet.http.HttpSession
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||