@ConsumerType
public class MockHttpSession
extends java.lang.Object
implements javax.servlet.http.HttpSession
HttpSession implementation.| Constructor and Description |
|---|
MockHttpSession() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getAttribute(java.lang.String name) |
java.util.Enumeration<java.lang.String> |
getAttributeNames() |
long |
getCreationTime() |
java.lang.String |
getId() |
long |
getLastAccessedTime() |
int |
getMaxInactiveInterval() |
javax.servlet.ServletContext |
getServletContext() |
javax.servlet.http.HttpSessionContext |
getSessionContext() |
java.lang.Object |
getValue(java.lang.String name) |
java.lang.String[] |
getValueNames() |
void |
invalidate() |
boolean |
isInvalidated() |
boolean |
isNew() |
protected MockServletContext |
newMockServletContext() |
void |
putValue(java.lang.String name,
java.lang.Object value) |
void |
removeAttribute(java.lang.String name) |
void |
removeValue(java.lang.String name) |
void |
setAttribute(java.lang.String name,
java.lang.Object value) |
void |
setMaxInactiveInterval(int interval) |
void |
setNew(boolean isNew) |
protected MockServletContext newMockServletContext()
public javax.servlet.ServletContext getServletContext()
getServletContext in interface javax.servlet.http.HttpSessionpublic java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface javax.servlet.http.HttpSessionpublic java.util.Enumeration<java.lang.String> getAttributeNames()
getAttributeNames in interface javax.servlet.http.HttpSessionpublic java.lang.String getId()
getId in interface javax.servlet.http.HttpSessionpublic long getCreationTime()
getCreationTime in interface javax.servlet.http.HttpSessionpublic java.lang.Object getValue(java.lang.String name)
getValue in interface javax.servlet.http.HttpSessionpublic java.lang.String[] getValueNames()
getValueNames in interface javax.servlet.http.HttpSessionpublic void putValue(java.lang.String name,
java.lang.Object value)
putValue in interface javax.servlet.http.HttpSessionpublic void removeAttribute(java.lang.String name)
removeAttribute in interface javax.servlet.http.HttpSessionpublic void removeValue(java.lang.String name)
removeValue in interface javax.servlet.http.HttpSessionpublic void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in interface javax.servlet.http.HttpSessionpublic void invalidate()
invalidate in interface javax.servlet.http.HttpSessionpublic boolean isInvalidated()
public boolean isNew()
isNew in interface javax.servlet.http.HttpSessionpublic void setNew(boolean isNew)
public long getLastAccessedTime()
getLastAccessedTime in interface javax.servlet.http.HttpSessionpublic int getMaxInactiveInterval()
getMaxInactiveInterval in interface javax.servlet.http.HttpSessionpublic void setMaxInactiveInterval(int interval)
setMaxInactiveInterval in interface javax.servlet.http.HttpSessionpublic javax.servlet.http.HttpSessionContext getSessionContext()
getSessionContext in interface javax.servlet.http.HttpSessionCopyright © 2014–2021 wcm.io. All rights reserved.