@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.HttpSession
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface javax.servlet.http.HttpSession
public java.util.Enumeration<java.lang.String> getAttributeNames()
getAttributeNames
in interface javax.servlet.http.HttpSession
public java.lang.String getId()
getId
in interface javax.servlet.http.HttpSession
public long getCreationTime()
getCreationTime
in interface javax.servlet.http.HttpSession
public java.lang.Object getValue(java.lang.String name)
getValue
in interface javax.servlet.http.HttpSession
public java.lang.String[] getValueNames()
getValueNames
in interface javax.servlet.http.HttpSession
public void putValue(java.lang.String name, java.lang.Object value)
putValue
in interface javax.servlet.http.HttpSession
public void removeAttribute(java.lang.String name)
removeAttribute
in interface javax.servlet.http.HttpSession
public void removeValue(java.lang.String name)
removeValue
in interface javax.servlet.http.HttpSession
public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface javax.servlet.http.HttpSession
public void invalidate()
invalidate
in interface javax.servlet.http.HttpSession
public boolean isInvalidated()
public boolean isNew()
isNew
in interface javax.servlet.http.HttpSession
public void setNew(boolean isNew)
public long getLastAccessedTime()
getLastAccessedTime
in interface javax.servlet.http.HttpSession
public int getMaxInactiveInterval()
getMaxInactiveInterval
in interface javax.servlet.http.HttpSession
public void setMaxInactiveInterval(int interval)
setMaxInactiveInterval
in interface javax.servlet.http.HttpSession
public javax.servlet.http.HttpSessionContext getSessionContext()
getSessionContext
in interface javax.servlet.http.HttpSession
Copyright © 2014–2021 wcm.io. All rights reserved.