Interface HttpSession

All Known Implementing Classes:
DefaultHttpSession

public interface HttpSession
The HttpSession API.
Author:
Manfred Riem ([email protected])
  • Method Details

    • getAttribute

      Object getAttribute(String name)
      Get the attribute.
      Parameters:
      name - the name.
      Returns:
      the value, or null if not found.
    • getAttributeNames

      Enumeration<String> getAttributeNames()
      Returns the attribute names.
      Returns:
      the attribute names
    • getCreationTime

      long getCreationTime()
      Returns the creation time.
      Returns:
      the creation time
    • getId

      String getId()
      Returns the id.
      Returns:
      the id
    • getLastAccessedTime

      long getLastAccessedTime()
      Returns the last accessed time.
      Returns:
      the last accessed time
    • getMaxInactiveInterval

      int getMaxInactiveInterval()
      Returns the max inactive interval.
      Returns:
      the max inactive interval
    • getServletContext

      ServletContext getServletContext()
      Returns the Servlet context.
      Returns:
      the Servlet context
    • getSessionContext

      @Deprecated HttpSessionContext getSessionContext()
      Deprecated.
      Returns the HTTP session context.
      Returns:
      the HTTP session context
    • getValue

      @Deprecated Object getValue(String name)
      Deprecated.
      Returns the value.
      Parameters:
      name - the name.
      Returns:
      the value
    • getValueNames

      @Deprecated String[] getValueNames()
      Deprecated.
      Returns the value names.
      Returns:
      the value names
    • invalidate

      void invalidate()
      Invalidate the HTTP session.
    • isNew

      boolean isNew()
      Is the HTTP session new.
      Returns:
      true if it is, false otherwise.
    • putValue

      @Deprecated void putValue(String name, Object value)
      Deprecated.
      Put the value.
      Parameters:
      name - the name.
      value - the value.
    • removeAttribute

      void removeAttribute(String name)
      Remove the attribute.
      Parameters:
      name - the name.
    • removeValue

      @Deprecated void removeValue(String name)
      Deprecated.
      Remove the value.
      Parameters:
      name - the name.
    • setAttribute

      void setAttribute(String name, Object value)
      Set the attribute.
      Parameters:
      name - the name.
      value - the value.
    • setMaxInactiveInterval

      void setMaxInactiveInterval(int interval)
      Set the max inactive interval.
      Parameters:
      interval - the max inactive interval.