Package org.atmosphere.cpr
Class DefaultAtmosphereResourceSession
- java.lang.Object
-
- org.atmosphere.cpr.DefaultAtmosphereResourceSession
-
- All Implemented Interfaces:
AtmosphereResourceSession
public class DefaultAtmosphereResourceSession extends java.lang.Object implements AtmosphereResourceSession
- Author:
- uklance (https://github.com/uklance)
-
-
Constructor Summary
Constructors Constructor Description DefaultAtmosphereResourceSession()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckValid()java.lang.ObjectgetAttribute(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> TgetAttribute(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 namejava.util.Collection<java.lang.String>getAttributeNames()Returns a Collection of Strings containing the names of all the objects bound to this session.voidinvalidate()Invalidates this session then unbinds any objects bound to it.java.lang.ObjectsetAttribute(java.lang.String name, java.lang.Object value)Binds an object to this session, using the name specified
-
-
-
Method Detail
-
setAttribute
public java.lang.Object setAttribute(java.lang.String name, java.lang.Object value)Description copied from interface:AtmosphereResourceSessionBinds an object to this session, using the name specified- Specified by:
setAttributein interfaceAtmosphereResourceSession- Parameters:
name- Attribute namevalue- Attribute value- Returns:
- the previous value associated with name, or null if there was no mapping for name
-
getAttribute
public java.lang.Object getAttribute(java.lang.String name)
Description copied from interface:AtmosphereResourceSessionReturns the object bound with the specified name in this session, or null if no object is bound under the name- Specified by:
getAttributein interfaceAtmosphereResourceSession- Parameters:
name- Attribute name- Returns:
- the object with the specified name
-
getAttribute
public <T> T getAttribute(java.lang.String name, java.lang.Class<T> type)Description copied from interface:AtmosphereResourceSessionReturns the object bound with the specified name in this session, or null if no object is bound under the name- Specified by:
getAttributein interfaceAtmosphereResourceSession- Parameters:
name- Attribute nametype- Attribute type- Returns:
- the object with the specified name
-
getAttributeNames
public java.util.Collection<java.lang.String> getAttributeNames()
Description copied from interface:AtmosphereResourceSessionReturns a Collection of Strings containing the names of all the objects bound to this session.- Specified by:
getAttributeNamesin interfaceAtmosphereResourceSession- Returns:
- a Collection of Strings containing the names of all the objects bound to this session
-
invalidate
public void invalidate()
Description copied from interface:AtmosphereResourceSessionInvalidates this session then unbinds any objects bound to it.- Specified by:
invalidatein interfaceAtmosphereResourceSession
-
checkValid
protected void checkValid()
-
-