org.atmosphere.cpr
Class DefaultAtmosphereResourceSession

java.lang.Object
  extended by org.atmosphere.cpr.DefaultAtmosphereResourceSession
All Implemented Interfaces:
AtmosphereResourceSession

public class DefaultAtmosphereResourceSession
extends Object
implements AtmosphereResourceSession

Author:
uklance (https://github.com/uklance)

Constructor Summary
DefaultAtmosphereResourceSession()
           
 
Method Summary
protected  void checkValid()
           
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAtmosphereResourceSession

public DefaultAtmosphereResourceSession()
Method Detail

setAttribute

public Object setAttribute(String name,
                           Object value)
Description copied from interface: AtmosphereResourceSession
Binds an object to this session, using the name specified

Specified by:
setAttribute in interface AtmosphereResourceSession
Parameters:
name - Attribute name
value - Attribute value
Returns:
the previous value associated with name, or null if there was no mapping for name

getAttribute

public Object getAttribute(String name)
Description copied from interface: AtmosphereResourceSession
Returns the object bound with the specified name in this session, or null if no object is bound under the name

Specified by:
getAttribute in interface AtmosphereResourceSession
Parameters:
name - Attribute name
Returns:
the object with the specified name

getAttribute

public <T> T getAttribute(String name,
                          Class<T> type)
Description copied from interface: AtmosphereResourceSession
Returns the object bound with the specified name in this session, or null if no object is bound under the name

Specified by:
getAttribute in interface AtmosphereResourceSession
Parameters:
name - Attribute name
type - Attribute type
Returns:
the object with the specified name

getAttributeNames

public Collection<String> getAttributeNames()
Description copied from interface: AtmosphereResourceSession
Returns a Collection of Strings containing the names of all the objects bound to this session.

Specified by:
getAttributeNames in interface AtmosphereResourceSession
Returns:
a Collection of Strings containing the names of all the objects bound to this session

invalidate

public void invalidate()
Description copied from interface: AtmosphereResourceSession
Invalidates this session then unbinds any objects bound to it.

Specified by:
invalidate in interface AtmosphereResourceSession

checkValid

protected void checkValid()


Copyright © 2014. All Rights Reserved.