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 |
---|---|
Object |
getAttribute(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(String name,
Class<T> type)
Returns the object bound with the specified name in this session, or null
if no object is bound under the name
|
Collection<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.
|
Object |
setAttribute(String name,
Object value)
Binds an object to this session, using the name specified
|
Object setAttribute(String name, Object value)
name
- Attribute namevalue
- Attribute valueIllegalStateException
- if this method is called on an invalidated sessionObject getAttribute(String name)
name
- Attribute nameIllegalStateException
- if this method is called on an invalidated session<T> T getAttribute(String name, Class<T> type)
name
- Attribute nametype
- Attribute typeIllegalStateException
- if this method is called on an invalidated sessionCollection<String> getAttributeNames()
IllegalStateException
- if this method is called on an invalidated sessionvoid invalidate()
IllegalStateException
- if this method is called on an invalidated sessionCopyright © 2016. All rights reserved.