Class HttpSessionWrapper
java.lang.Object
org.apache.felix.http.base.internal.handler.HttpSessionWrapper
- All Implemented Interfaces:
jakarta.servlet.http.HttpSession
The session wrapper keeps track of the internal session, manages their attributes
separately and also handles session timeout.
-
Constructor Summary
ConstructorsConstructorDescriptionHttpSessionWrapper
(jakarta.servlet.http.HttpSession session, ExtServletContext context, org.apache.felix.http.base.internal.HttpConfig config, boolean terminate) Creates a newHttpSessionWrapper
instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getAttribute
(String name) long
getExpiredSessionContextNames
(jakarta.servlet.http.HttpSession session) getId()
long
int
jakarta.servlet.ServletContext
getSessionContextNames
(jakarta.servlet.http.HttpSession session) Get the names of all contexts using a session.String[]
int
hashCode()
static boolean
hasSession
(String contextName, jakarta.servlet.http.HttpSession session) void
boolean
isNew()
void
void
removeAttribute
(String name) void
removeValue
(String name) void
setAttribute
(String name, Object value) void
setMaxInactiveInterval
(int interval)
-
Constructor Details
-
HttpSessionWrapper
public HttpSessionWrapper(jakarta.servlet.http.HttpSession session, ExtServletContext context, org.apache.felix.http.base.internal.HttpConfig config, boolean terminate) Creates a newHttpSessionWrapper
instance.
-
-
Method Details
-
hasSession
-
getExpiredSessionContextNames
-
getSessionContextNames
Get the names of all contexts using a session.- Parameters:
session
- The underlying session- Returns:
- The set of names
-
getAttribute
- Specified by:
getAttribute
in interfacejakarta.servlet.http.HttpSession
-
getAttributeNames
- Specified by:
getAttributeNames
in interfacejakarta.servlet.http.HttpSession
-
getCreationTime
public long getCreationTime()- Specified by:
getCreationTime
in interfacejakarta.servlet.http.HttpSession
-
getId
- Specified by:
getId
in interfacejakarta.servlet.http.HttpSession
-
getLastAccessedTime
public long getLastAccessedTime()- Specified by:
getLastAccessedTime
in interfacejakarta.servlet.http.HttpSession
-
getMaxInactiveInterval
public int getMaxInactiveInterval()- Specified by:
getMaxInactiveInterval
in interfacejakarta.servlet.http.HttpSession
-
getServletContext
public jakarta.servlet.ServletContext getServletContext()- Specified by:
getServletContext
in interfacejakarta.servlet.http.HttpSession
-
getValue
-
getValueNames
-
invalidate
public void invalidate()- Specified by:
invalidate
in interfacejakarta.servlet.http.HttpSession
-
isNew
public boolean isNew()- Specified by:
isNew
in interfacejakarta.servlet.http.HttpSession
-
putValue
-
removeAttribute
- Specified by:
removeAttribute
in interfacejakarta.servlet.http.HttpSession
-
removeValue
-
setAttribute
- Specified by:
setAttribute
in interfacejakarta.servlet.http.HttpSession
-
setMaxInactiveInterval
public void setMaxInactiveInterval(int interval) - Specified by:
setMaxInactiveInterval
in interfacejakarta.servlet.http.HttpSession
-
hashCode
public int hashCode() -
equals
-