public class ServletWebSession extends java.lang.Object implements WebSession
HttpSession as
WebSession.| Constructor and Description |
|---|
ServletWebSession(javax.servlet.http.HttpSession session) |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(DescriptionReceiver receiver)
Invoked to have the receiver describe itself (largely in terms of properties and values).
|
java.lang.Object |
getAttribute(java.lang.String name)
Returns the named object, or null if no attribute has been stored with the given name.
|
java.util.List |
getAttributeNames()
Returns a list of all known attributes in ascending alphabetical order.
|
java.lang.String |
getId()
Returns a unique string identifier used to identify the session.
|
void |
invalidate()
Invalidates this session then unbinds any objects bound to it.
|
boolean |
isNew()
Returns true if the client does not yet know about the session or if the client chooses not
to join the session.
|
void |
setAttribute(java.lang.String name,
java.lang.Object attribute)
Updates the attribute, replacing (or removing) its value.
|
public ServletWebSession(javax.servlet.http.HttpSession session)
public void describeTo(DescriptionReceiver receiver)
DescribabletoString().describeTo in interface Describablepublic java.util.List getAttributeNames()
AttributeHoldergetAttributeNames in interface AttributeHolderpublic java.lang.Object getAttribute(java.lang.String name)
AttributeHoldergetAttribute in interface AttributeHolderpublic void setAttribute(java.lang.String name, java.lang.Object attribute)
AttributeHolderWebSession
attribute in a clustered application).setAttribute in interface AttributeHoldername - the name of the attribute to updateattribute - the new value for the attribute, or null to delete the attribute entirely.public java.lang.String getId()
WebSessiongetId in interface WebSessionWebResponse.encodeURL(String).public boolean isNew()
WebSessionisNew in interface WebSessionpublic void invalidate()
WebSessioninvalidate in interface WebSession