Class HazelcastHttpSession

java.lang.Object
cloud.piranha.extension.hazelcast.HazelcastHttpSession
All Implemented Interfaces:
jakarta.servlet.http.HttpSession, Serializable

public class HazelcastHttpSession extends Object implements jakarta.servlet.http.HttpSession, Serializable
The Hazelcast HttpSession.
Author:
Manfred Riem ([email protected])
See Also:
  • Constructor Details

    • HazelcastHttpSession

      public HazelcastHttpSession()
      Constructor.
    • HazelcastHttpSession

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

      public HazelcastHttpSession(jakarta.servlet.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)
      Returns the attribute value.
      Specified by:
      getAttribute in interface jakarta.servlet.http.HttpSession
      Parameters:
      name - the attribute name.
      Returns:
      the attribute value
      See Also:
      • HttpSession.getAttribute(java.lang.String)
    • getAttributeNames

      public Enumeration<String> getAttributeNames()
      Returns the attribute names.
      Specified by:
      getAttributeNames in interface jakarta.servlet.http.HttpSession
      Returns:
      the attribute names
      See Also:
      • HttpSession.getAttributeNames()
    • getCreationTime

      public long getCreationTime()
      Returns the creation time.
      Specified by:
      getCreationTime in interface jakarta.servlet.http.HttpSession
      Returns:
      the creation time
      See Also:
      • HttpSession.getCreationTime()
    • getId

      public String getId()
      Returns the id.
      Specified by:
      getId in interface jakarta.servlet.http.HttpSession
      Returns:
      the id
      See Also:
      • HttpSession.getId()
    • getLastAccessedTime

      public long getLastAccessedTime()
      Returns the last accessed time.
      Specified by:
      getLastAccessedTime in interface jakarta.servlet.http.HttpSession
      Returns:
      the last accessed time
      See Also:
      • HttpSession.getLastAccessedTime()
    • getMaxInactiveInterval

      public int getMaxInactiveInterval()
      Returns the maximum inactive interval.
      Specified by:
      getMaxInactiveInterval in interface jakarta.servlet.http.HttpSession
      Returns:
      the maximum inactive interval
      See Also:
      • HttpSession.getMaxInactiveInterval()
    • getServletContext

      public jakarta.servlet.ServletContext getServletContext()
      Returns the servlet context.
      Specified by:
      getServletContext in interface jakarta.servlet.http.HttpSession
      Returns:
      the servlet context
      See Also:
      • HttpSession.getServletContext()
    • invalidate

      public void invalidate()
      Invalidate the session.
      Specified by:
      invalidate in interface jakarta.servlet.http.HttpSession
      See Also:
      • HttpSession.invalidate()
    • isNew

      public boolean isNew()
      Is the session new.
      Specified by:
      isNew in interface jakarta.servlet.http.HttpSession
      Returns:
      true if it is, false otherwise.
      See Also:
      • HttpSession.isNew()
    • removeAttribute

      public void removeAttribute(String name)
      Remove the attribute.
      Specified by:
      removeAttribute in interface jakarta.servlet.http.HttpSession
      Parameters:
      name - the attribute name.
      See Also:
      • HttpSession.removeAttribute(java.lang.String)
    • setAttribute

      public void setAttribute(String name, Object value)
      Set the attribute.
      Specified by:
      setAttribute in interface jakarta.servlet.http.HttpSession
      Parameters:
      name - the attribute name.
      value - the attribute value.
      See Also:
      • HttpSession.setAttribute(java.lang.String, java.lang.Object)
    • setId

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

      public void setMaxInactiveInterval(int maxInactiveInterval)
      Set the maximum inactive interval.
      Specified by:
      setMaxInactiveInterval in interface jakarta.servlet.http.HttpSession
      Parameters:
      maxInactiveInterval - the maximum inactive interval.
      See Also:
      • HttpSession.setMaxInactiveInterval(int)
    • setNew

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

      public void setServletContext(jakarta.servlet.ServletContext servletContext)
      Set the servlet context.
      Parameters:
      servletContext - the servlet context.
    • setSessionManager

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