public interface HttpSession extends HttpSession
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.lang.String |
getId()
Returns a string containing the unique identifier assigned to this
session.
|
void |
removeAttribute(java.lang.String name)
Removes the object bound with the specified name from
this session.
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Binds an object to this session, using the name specified.
|
getAttributeNames, getCreationTime, getLastAccessedTime, getMaxInactiveInterval, getServletContext, getSessionContext, getValue, getValueNames, invalidate, isNew, putValue, removeValue, setMaxInactiveInterval
void removeAttribute(java.lang.String name)
HttpSession
After this method executes, and if the object
implements HttpSessionBindingListener
,
the container calls
HttpSessionBindingListener.valueUnbound
. The container
then notifies any HttpSessionAttributeListener
s in the web
application.
removeAttribute
in interface HttpSession
name
- the name of the object to
remove from this sessionjava.lang.Object getAttribute(java.lang.String name)
null
if no object is bound under the name.getAttribute
in interface HttpSession
name
- a string specifying the name of the objectvoid setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface HttpSession
name
- the name to which the object is bound; cannot be nullvalue
- the object to be boundjava.lang.String getId()
getId
in interface HttpSession