public class MockHttpSessionProxy extends MockHttpSession
| Constructor and Description |
|---|
MockHttpSessionProxy(MockServletContext servletContext,
MockHttpServletRequest request) |
| Modifier and Type | Method and Description |
|---|---|
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() |
MockHttpServletRequest |
getRequest() |
javax.servlet.ServletContext |
getServletContext() |
javax.servlet.http.HttpSessionContext |
getSessionContext() |
Object |
getValue(String name) |
String[] |
getValueNames() |
MockHttpSession |
getWrapped() |
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 |
setRequest(MockHttpServletRequest request) |
void |
setServletContext(javax.servlet.ServletContext servletContext)
Set the ServletContext associated with this session.
|
getWebContainerpublic MockHttpSessionProxy(MockServletContext servletContext, MockHttpServletRequest request)
public void addAttributeListener(javax.servlet.http.HttpSessionAttributeListener listener)
MockHttpSessionAdd a new listener instance that should be notified about attribute changes.
addAttributeListener in class MockHttpSessionlistener - The new listener to be addedpublic void setServletContext(javax.servlet.ServletContext servletContext)
MockHttpSessionSet the ServletContext associated with this session.
setServletContext in class MockHttpSessionservletContext - The associated servlet contextpublic void setId(String id)
MockHttpSessionSet the session identifier of this session.
setId in class MockHttpSessionid - The new session identifierpublic Object getAttribute(String name)
MockHttpSessiongetAttribute in interface javax.servlet.http.HttpSessiongetAttribute in class MockHttpSessionpublic Enumeration getAttributeNames()
MockHttpSessiongetAttributeNames in interface javax.servlet.http.HttpSessiongetAttributeNames in class MockHttpSessionpublic long getCreationTime()
MockHttpSessiongetCreationTime in interface javax.servlet.http.HttpSessiongetCreationTime in class MockHttpSessionpublic String getId()
MockHttpSessiongetId in interface javax.servlet.http.HttpSessiongetId in class MockHttpSessionpublic long getLastAccessedTime()
MockHttpSessiongetLastAccessedTime in interface javax.servlet.http.HttpSessiongetLastAccessedTime in class MockHttpSessionpublic int getMaxInactiveInterval()
MockHttpSessiongetMaxInactiveInterval in interface javax.servlet.http.HttpSessiongetMaxInactiveInterval in class MockHttpSessionpublic javax.servlet.ServletContext getServletContext()
MockHttpSessiongetServletContext in interface javax.servlet.http.HttpSessiongetServletContext in class MockHttpSessionpublic javax.servlet.http.HttpSessionContext getSessionContext()
MockHttpSessiongetSessionContext in interface javax.servlet.http.HttpSessiongetSessionContext in class MockHttpSessionpublic Object getValue(String name)
MockHttpSessiongetValue in interface javax.servlet.http.HttpSessiongetValue in class MockHttpSessionpublic String[] getValueNames()
MockHttpSessiongetValueNames in interface javax.servlet.http.HttpSessiongetValueNames in class MockHttpSessionpublic void invalidate()
MockHttpSessioninvalidate in interface javax.servlet.http.HttpSessioninvalidate in class MockHttpSessionpublic boolean isNew()
MockHttpSessionisNew in interface javax.servlet.http.HttpSessionisNew in class MockHttpSessionpublic void putValue(String name, Object value)
MockHttpSessionputValue in interface javax.servlet.http.HttpSessionputValue in class MockHttpSessionpublic void removeAttribute(String name)
MockHttpSessionremoveAttribute in interface javax.servlet.http.HttpSessionremoveAttribute in class MockHttpSessionpublic void removeValue(String name)
MockHttpSessionremoveValue in interface javax.servlet.http.HttpSessionremoveValue in class MockHttpSessionpublic void setAttribute(String name, Object value)
MockHttpSessionsetAttribute in interface javax.servlet.http.HttpSessionsetAttribute in class MockHttpSessionpublic void setMaxInactiveInterval(int interval)
MockHttpSessionsetMaxInactiveInterval in interface javax.servlet.http.HttpSessionsetMaxInactiveInterval in class MockHttpSessionpublic MockHttpSession getWrapped()
public MockHttpServletRequest getRequest()
public void setRequest(MockHttpServletRequest request)
request - the request to setCopyright © 2017 The Apache Software Foundation. All rights reserved.