Class DefaultHttpSession

java.lang.Object
cloud.piranha.core.impl.DefaultHttpSession
All Implemented Interfaces:
HttpSession

public class DefaultHttpSession extends Object implements HttpSession
The default HttpSession.
Author:
Manfred Riem ([email protected])
  • Constructor Details

    • DefaultHttpSession

      public DefaultHttpSession(ServletContext servletContext)
      Constructor.
      Parameters:
      servletContext - the servlet context.
    • DefaultHttpSession

      public DefaultHttpSession(ServletContext servletContext, String id, boolean newFlag)
      Constructor.
      Parameters:
      servletContext - the servlet context.
      id - the id.
      newFlag - the new flag.
  • Method Details

    • getAttribute

      public Object getAttribute(String name)
      Description copied from interface: HttpSession
      Get the attribute.
      Specified by:
      getAttribute in interface HttpSession
      Parameters:
      name - the name.
      Returns:
      the value, or null if not found.
    • getAttributeNames

      public Enumeration<String> getAttributeNames()
      Description copied from interface: HttpSession
      Returns the attribute names.
      Specified by:
      getAttributeNames in interface HttpSession
      Returns:
      the attribute names
    • getCreationTime

      public long getCreationTime()
      Description copied from interface: HttpSession
      Returns the creation time.
      Specified by:
      getCreationTime in interface HttpSession
      Returns:
      the creation time
    • getId

      public String getId()
      Description copied from interface: HttpSession
      Returns the id.
      Specified by:
      getId in interface HttpSession
      Returns:
      the id
    • getLastAccessedTime

      public long getLastAccessedTime()
      Description copied from interface: HttpSession
      Returns the last accessed time.
      Specified by:
      getLastAccessedTime in interface HttpSession
      Returns:
      the last accessed time
    • getMaxInactiveInterval

      public int getMaxInactiveInterval()
      Description copied from interface: HttpSession
      Returns the max inactive interval.
      Specified by:
      getMaxInactiveInterval in interface HttpSession
      Returns:
      the max inactive interval
    • getServletContext

      public ServletContext getServletContext()
      Description copied from interface: HttpSession
      Returns the Servlet context.
      Specified by:
      getServletContext in interface HttpSession
      Returns:
      the Servlet context
    • getSessionContext

      public HttpSessionContext getSessionContext()
      Description copied from interface: HttpSession
      Returns the HTTP session context.
      Specified by:
      getSessionContext in interface HttpSession
      Returns:
      the HTTP session context
    • getValue

      public Object getValue(String name)
      Description copied from interface: HttpSession
      Returns the value.
      Specified by:
      getValue in interface HttpSession
      Parameters:
      name - the name.
      Returns:
      the value
    • getValueNames

      public String[] getValueNames()
      Description copied from interface: HttpSession
      Returns the value names.
      Specified by:
      getValueNames in interface HttpSession
      Returns:
      the value names
    • invalidate

      public void invalidate()
      Description copied from interface: HttpSession
      Invalidate the HTTP session.
      Specified by:
      invalidate in interface HttpSession
    • isNew

      public boolean isNew()
      Description copied from interface: HttpSession
      Is the HTTP session new.
      Specified by:
      isNew in interface HttpSession
      Returns:
      true if it is, false otherwise.
    • putValue

      public void putValue(String name, Object value)
      Description copied from interface: HttpSession
      Put the value.
      Specified by:
      putValue in interface HttpSession
      Parameters:
      name - the name.
      value - the value.
    • removeAttribute

      public void removeAttribute(String name)
      Description copied from interface: HttpSession
      Remove the attribute.
      Specified by:
      removeAttribute in interface HttpSession
      Parameters:
      name - the name.
    • removeValue

      public void removeValue(String name)
      Description copied from interface: HttpSession
      Remove the value.
      Specified by:
      removeValue in interface HttpSession
      Parameters:
      name - the name.
    • setAttribute

      public void setAttribute(String name, Object value)
      Description copied from interface: HttpSession
      Set the attribute.
      Specified by:
      setAttribute in interface HttpSession
      Parameters:
      name - the name.
      value - the value.
    • setId

      public void setId(String id)
      Set the id.
      Parameters:
      id - the id.
    • setMaxInactiveInterval

      public void setMaxInactiveInterval(int maxInactiveInterval)
      Description copied from interface: HttpSession
      Set the max inactive interval.
      Specified by:
      setMaxInactiveInterval in interface HttpSession
      Parameters:
      maxInactiveInterval - the max inactive interval.
    • setNew

      public void setNew(boolean newFlag)
      Set the new flag.
      Parameters:
      newFlag - the new flag.
    • setSessionManager

      public void setSessionManager(HttpSessionManager sessionManager)
      Set the HTTP session manager.
      Parameters:
      sessionManager - the HTTP session manager.
    • setLastAccessedTime

      public void setLastAccessedTime(long lastAccessedTime)
      Set the last accessed time.
      Parameters:
      lastAccessedTime - the last accessed time.