public class ServletSessionAdapter extends java.lang.Object implements HttpSession
Modifier and Type | Field and Description |
---|---|
protected jakarta.servlet.http.HttpSession |
session |
Constructor and Description |
---|
ServletSessionAdapter(jakarta.servlet.http.HttpSession session) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Returns the object bound with the specified name in this session, or
null if no object is bound under the name. |
java.util.Enumeration<java.lang.String> |
getAttributeNames() |
long |
getCreationTime() |
java.lang.String |
getId()
Returns a string containing the unique identifier assigned to this
session.
|
long |
getLastAccessedTime() |
int |
getMaxInactiveInterval() |
ServletContext |
getServletContext() |
HttpSessionContext |
getSessionContext() |
java.lang.Object |
getValue(java.lang.String s) |
java.lang.String[] |
getValueNames() |
void |
invalidate() |
boolean |
isNew() |
void |
putValue(java.lang.String s,
java.lang.Object o) |
void |
removeAttribute(java.lang.String name) |
void |
removeValue(java.lang.String s) |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Binds an object to this session, using the name specified.
|
void |
setMaxInactiveInterval(int i) |
public ServletSessionAdapter(jakarta.servlet.http.HttpSession session)
public long getCreationTime()
public java.lang.String getId()
HttpSession
getId
in interface HttpSession
public long getLastAccessedTime()
public ServletContext getServletContext()
public void setMaxInactiveInterval(int i)
public int getMaxInactiveInterval()
public HttpSessionContext getSessionContext()
public java.lang.Object getAttribute(java.lang.String name)
HttpSession
null
if no object is bound under the name.getAttribute
in interface HttpSession
name
- a string specifying the name of the objectpublic java.lang.Object getValue(java.lang.String s)
public java.util.Enumeration<java.lang.String> getAttributeNames()
public java.lang.String[] getValueNames()
public void setAttribute(java.lang.String name, java.lang.Object value)
HttpSession
setAttribute
in interface HttpSession
name
- the name to which the object is bound; cannot be nullvalue
- the object to be boundpublic void putValue(java.lang.String s, java.lang.Object o)
public void removeAttribute(java.lang.String name)
removeAttribute
in interface HttpSession
public void removeValue(java.lang.String s)
public void invalidate()
public boolean isNew()