@Override public void sessionCreated(HttpSessionEvent se) { NuxeoHttpSessionMonitor.instance().addEntry(se.getSession()); }
@Override public void sessionDestroyed(HttpSessionEvent se) { NuxeoHttpSessionMonitor.instance().removeEntry(se.getSession().getId()); }
@Factory(value = "userHttpSessions", scope = ScopeType.EVENT) public List<SessionInfo> getUserSessions() { if (getSelectedHttpSessionsTimeRange().equals("all")) { return NuxeoHttpSessionMonitor.instance().getSortedSessions(); } else { long maxInactivity = Long.parseLong(selectedHttpSessionsTimeRange.replace("s", "")); return NuxeoHttpSessionMonitor.instance().getSortedSessions(maxInactivity); } }
@Factory(value = "userHttpSessions", scope = ScopeType.EVENT) public List<SessionInfo> getUserSessions() { if (getSelectedHttpSessionsTimeRange().equals("all")) { return NuxeoHttpSessionMonitor.instance().getSortedSessions(); } else { long maxInactivity = Long.parseLong(selectedHttpSessionsTimeRange.replace("s", "")); return NuxeoHttpSessionMonitor.instance().getSortedSessions(maxInactivity); } }
public void onAuthenticatedSessionCreated(ServletRequest request, HttpSession session, CachableUserIdentificationInfo cachebleUserInfo) { NuxeoHttpSessionMonitor.instance().associatedUser(session, cachebleUserInfo.getPrincipal().getName()); if (!sessionManagers.isEmpty()) { for (String smName : sessionManagers.keySet()) { NuxeoAuthenticationSessionManager sm = sessionManagers.get(smName); sm.onAuthenticatedSessionCreated(request, session, cachebleUserInfo); } } }
@Factory(value = "nbActiveUserHttpSessions", scope = ScopeType.EVENT) public int getUserSessionsCount() { return NuxeoHttpSessionMonitor.instance().getSortedSessions().size(); }
@Factory(value = "nbActiveUserHttpSessions", scope = ScopeType.EVENT) public int getUserSessionsCount() { return NuxeoHttpSessionMonitor.instance().getSortedSessions().size(); }
@Factory(value = "nbUserRequests", scope = ScopeType.EVENT) public long getUserRequestCount() { return NuxeoHttpSessionMonitor.instance().getGlobalRequestCounter(); }
@Factory(value = "nbUserRequests", scope = ScopeType.EVENT) public long getUserRequestCount() { return NuxeoHttpSessionMonitor.instance().getGlobalRequestCounter(); }
log.debug("userIdent found in cache, get the Principal from it without reloggin"); NuxeoHttpSessionMonitor.instance().updateEntry(httpRequest);