Interface AtmosphereResourceSession

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method 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
    • Method Detail

      • setAttribute

        java.lang.Object setAttribute​(java.lang.String name,
                                      java.lang.Object value)
        Binds an object to this session, using the name specified
        Parameters:
        name - Attribute name
        value - Attribute value
        Returns:
        the previous value associated with name, or null if there was no mapping for name
        Throws:
        java.lang.IllegalStateException - if this method is called on an invalidated session
      • getAttribute

        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
        Parameters:
        name - Attribute name
        Returns:
        the object with the specified name
        Throws:
        java.lang.IllegalStateException - if this method is called on an invalidated session
      • getAttribute

        <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
        Parameters:
        name - Attribute name
        type - Attribute type
        Returns:
        the object with the specified name
        Throws:
        java.lang.IllegalStateException - if this method is called on an invalidated session
      • getAttributeNames

        java.util.Collection<java.lang.String> getAttributeNames()
        Returns a Collection of Strings containing the names of all the objects bound to this session.
        Returns:
        a Collection of Strings containing the names of all the objects bound to this session
        Throws:
        java.lang.IllegalStateException - if this method is called on an invalidated session
      • invalidate

        void invalidate()
        Invalidates this session then unbinds any objects bound to it.
        Throws:
        java.lang.IllegalStateException - if this method is called on an invalidated session