public interface AtmosphereResourceSession
AtmosphereResourceSessionFactory. It is created on demand by via
AtmosphereResourceSessionFactory.getSession(AtmosphereResource, boolean)
or AtmosphereResourceSessionFactory.getSession(AtmosphereResource).
It allows serverside values to be stored against an
AtmosphereResource and lives for the lifetime of the
AtmosphereResource| 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
|
<T> T |
getAttribute(java.lang.String name,
java.lang.Class<T> type)
Returns the object bound with the specified name in this session, or null
if no object is bound under the name
|
java.util.Collection<java.lang.String> |
getAttributeNames()
Returns a Collection of Strings containing the names of all the objects
bound to this session.
|
void |
invalidate()
Invalidates this session then unbinds any objects bound to it.
|
java.lang.Object |
setAttribute(java.lang.String name,
java.lang.Object value)
Binds an object to this session, using the name specified
|
java.lang.Object setAttribute(java.lang.String name,
java.lang.Object value)
name - Attribute namevalue - Attribute valuejava.lang.IllegalStateException - if this method is called on an invalidated sessionjava.lang.Object getAttribute(java.lang.String name)
name - Attribute namejava.lang.IllegalStateException - if this method is called on an invalidated session<T> T getAttribute(java.lang.String name,
java.lang.Class<T> type)
name - Attribute nametype - Attribute typejava.lang.IllegalStateException - if this method is called on an invalidated sessionjava.util.Collection<java.lang.String> getAttributeNames()
java.lang.IllegalStateException - if this method is called on an invalidated sessionvoid invalidate()
java.lang.IllegalStateException - if this method is called on an invalidated sessionCopyright © 2024. All Rights Reserved.