public class HttpSessionImpl extends java.lang.Object implements HttpSession
Constructor and Description |
---|
HttpSessionImpl() |
HttpSessionImpl(java.lang.String contextPath,
long timeout) |
Modifier and Type | Method and Description |
---|---|
void |
callListeners() |
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() |
void |
invalidate() |
boolean |
isNew() |
void |
newSessionId() |
void |
removeAttribute(java.lang.String name) |
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 HttpSessionImpl(java.lang.String contextPath, long timeout)
public HttpSessionImpl()
public void callListeners()
public void newSessionId()
public void removeAttribute(java.lang.String name)
removeAttribute
in interface HttpSession
public void invalidate()
public boolean isNew()
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.util.Enumeration<java.lang.String> getAttributeNames()
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 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()