Class NuxeoHttpSessionMonitor
- java.lang.Object
-
- org.nuxeo.ecm.platform.web.common.session.NuxeoHttpSessionMonitor
-
public class NuxeoHttpSessionMonitor extends Object
Singleton used to keep track of all HttpSessions. This Singleton is populated/updated either via the HttpSessionListener or via directedly via the Authentication filter- Since:
- 5.4.2
- Author:
- Tiry ([email protected])
-
-
Field Summary
Fields Modifier and Type Field Description protected long
globalRequestCounter
protected static NuxeoHttpSessionMonitor
instance
protected static Log
log
static String
REQUEST_COUNTER
static long
REQUEST_COUNTER_STEP
static String
SESSION_COUNTER
protected Map<String,SessionInfo>
sessionTracker
-
Constructor Summary
Constructors Constructor Description NuxeoHttpSessionMonitor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SessionInfo
addEntry(javax.servlet.http.HttpSession session)
SessionInfo
associatedUser(javax.servlet.http.HttpServletRequest request)
SessionInfo
associatedUser(javax.servlet.http.HttpSession session, String userName)
long
getGlobalRequestCounter()
List<SessionInfo>
getSortedSessions()
List<SessionInfo>
getSortedSessions(long maxInactivity)
Collection<SessionInfo>
getTrackedSessions()
protected void
increaseRequestCounter()
static NuxeoHttpSessionMonitor
instance()
void
removeEntry(String sid)
void
removeEntry(String sid, boolean invalidate)
Remove the associated session.SessionInfo
updateEntry(javax.servlet.http.HttpServletRequest request)
-
-
-
Field Detail
-
REQUEST_COUNTER
public static final String REQUEST_COUNTER
- See Also:
- Constant Field Values
-
SESSION_COUNTER
public static final String SESSION_COUNTER
- See Also:
- Constant Field Values
-
REQUEST_COUNTER_STEP
public static final long REQUEST_COUNTER_STEP
- See Also:
- Constant Field Values
-
log
protected static final Log log
-
instance
protected static NuxeoHttpSessionMonitor instance
-
globalRequestCounter
protected long globalRequestCounter
-
sessionTracker
protected Map<String,SessionInfo> sessionTracker
-
-
Method Detail
-
instance
public static NuxeoHttpSessionMonitor instance()
-
increaseRequestCounter
protected void increaseRequestCounter()
-
addEntry
public SessionInfo addEntry(javax.servlet.http.HttpSession session)
-
associatedUser
public SessionInfo associatedUser(javax.servlet.http.HttpServletRequest request)
-
associatedUser
public SessionInfo associatedUser(javax.servlet.http.HttpSession session, String userName)
-
updateEntry
public SessionInfo updateEntry(javax.servlet.http.HttpServletRequest request)
-
removeEntry
public void removeEntry(String sid)
-
removeEntry
public void removeEntry(String sid, boolean invalidate)
Remove the associated session.- Parameters:
sid
- the session idinvalidate
- should the session be invalidated- Since:
- 2023.3
-
getTrackedSessions
public Collection<SessionInfo> getTrackedSessions()
-
getSortedSessions
public List<SessionInfo> getSortedSessions()
-
getSortedSessions
public List<SessionInfo> getSortedSessions(long maxInactivity)
-
getGlobalRequestCounter
public long getGlobalRequestCounter()
-
-