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 Summary
ConstructorDescriptionConstructor.HazelcastHttpSession
(jakarta.servlet.ServletContext servletContext) Constructor.HazelcastHttpSession
(jakarta.servlet.ServletContext servletContext, String id, boolean newFlag) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(String name) Returns the attribute value.Returns the attribute names.long
Returns the creation time.getId()
Returns the id.long
Returns the last accessed time.int
Returns the maximum inactive interval.jakarta.servlet.ServletContext
Returns the servlet context.void
Invalidate the session.boolean
isNew()
Is the session new.void
removeAttribute
(String name) Remove the attribute.void
setAttribute
(String name, Object value) Set the attribute.void
Set the id.void
setMaxInactiveInterval
(int maxInactiveInterval) Set the maximum inactive interval.void
setNew
(boolean newFlag) Set the new flag.void
setServletContext
(jakarta.servlet.ServletContext servletContext) Set the servlet context.void
setSessionManager
(HttpSessionManager sessionManager) Set the HTTP session manager.
-
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
Returns the attribute value.- Specified by:
getAttribute
in interfacejakarta.servlet.http.HttpSession
- Parameters:
name
- the attribute name.- Returns:
- the attribute value
- See Also:
-
HttpSession.getAttribute(java.lang.String)
-
getAttributeNames
Returns the attribute names.- Specified by:
getAttributeNames
in interfacejakarta.servlet.http.HttpSession
- Returns:
- the attribute names
- See Also:
-
HttpSession.getAttributeNames()
-
getCreationTime
public long getCreationTime()Returns the creation time.- Specified by:
getCreationTime
in interfacejakarta.servlet.http.HttpSession
- Returns:
- the creation time
- See Also:
-
HttpSession.getCreationTime()
-
getId
Returns the id.- Specified by:
getId
in interfacejakarta.servlet.http.HttpSession
- Returns:
- the id
- See Also:
-
HttpSession.getId()
-
getLastAccessedTime
public long getLastAccessedTime()Returns the last accessed time.- Specified by:
getLastAccessedTime
in interfacejakarta.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 interfacejakarta.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 interfacejakarta.servlet.http.HttpSession
- Returns:
- the servlet context
- See Also:
-
HttpSession.getServletContext()
-
invalidate
public void invalidate()Invalidate the session.- Specified by:
invalidate
in interfacejakarta.servlet.http.HttpSession
- See Also:
-
HttpSession.invalidate()
-
isNew
public boolean isNew()Is the session new.- Specified by:
isNew
in interfacejakarta.servlet.http.HttpSession
- Returns:
- true if it is, false otherwise.
- See Also:
-
HttpSession.isNew()
-
removeAttribute
Remove the attribute.- Specified by:
removeAttribute
in interfacejakarta.servlet.http.HttpSession
- Parameters:
name
- the attribute name.- See Also:
-
HttpSession.removeAttribute(java.lang.String)
-
setAttribute
Set the attribute.- Specified by:
setAttribute
in interfacejakarta.servlet.http.HttpSession
- Parameters:
name
- the attribute name.value
- the attribute value.- See Also:
-
HttpSession.setAttribute(java.lang.String, java.lang.Object)
-
setId
Set the id.- Parameters:
id
- the id.
-
setMaxInactiveInterval
public void setMaxInactiveInterval(int maxInactiveInterval) Set the maximum inactive interval.- Specified by:
setMaxInactiveInterval
in interfacejakarta.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
Set the HTTP session manager.- Parameters:
sessionManager
- the HTTP session manager.
-