@Test public void testGetAllSessionsInformations() { final long now = System.currentTimeMillis(); sessionListener.sessionCreated(createSessionEvent("1", true, now)); sessionListener.sessionCreated(createSessionEvent("2", true, now + 2)); sessionListener.sessionCreated(createSessionEvent("3", true, now)); sessionListener.sessionCreated(createSessionEvent("4", true, now - 2)); sessionListener.sessionCreated(createSessionEvent("5", true, now)); if (SessionListener.getAllSessionsInformations().size() != 5) { fail("getAllSessions"); } }
public static List<SessionInformations> getAllSessionsInformations() { final Collection<HttpSession> sessions = SESSION_MAP_BY_ID.values(); final List<SessionInformations> sessionsInformations = new ArrayList<SessionInformations>( sessions.size()); for (final HttpSession session : sessions) { try { sessionsInformations.add(new SessionInformations(session, false)); } catch (final Exception e) { continue; } } sortSessions(sessionsInformations); return Collections.unmodifiableList(sessionsInformations); }
SessionListener implements HttpSessionListener, HttpSessionActivationListener,
		ServletContextListener, Serializable { public static List<SessionInformations> getAllSessionsInformations() { final Collection<HttpSession> sessions = SESSION_MAP_BY_ID.values(); final List<SessionInformations> sessionsInformations = new ArrayList<SessionInformations>( sessions.size()); for (final HttpSession session : sessions) { try { sessionsInformations.add(new SessionInformations(session, false)); } catch (final Exception e) { continue; } } sortSessions(sessionsInformations); return Collections.unmodifiableList(sessionsInformations); } }
SessionListener implements HttpSessionListener, HttpSessionActivationListener,
		ServletContextListener, Serializable { public static List<SessionInformations> getAllSessionsInformations() { final Collection<HttpSession> sessions = SESSION_MAP_BY_ID.values(); final List<SessionInformations> sessionsInformations = new ArrayList<SessionInformations>( sessions.size()); for (final HttpSession session : sessions) { try { sessionsInformations.add(new SessionInformations(session, false)); } catch (final Exception e) { continue; } } sortSessions(sessionsInformations); return Collections.unmodifiableList(sessionsInformations); } SessionListener();  SessionListener(boolean instanceEnabled); }
SessionListener implements HttpSessionListener, HttpSessionActivationListener,
		ServletContextListener, Serializable { public static List<SessionInformations> getAllSessionsInformations() { final Collection<HttpSession> sessions = SESSION_MAP_BY_ID.values(); final List<SessionInformations> sessionsInformations = new ArrayList<SessionInformations>( sessions.size()); for (final HttpSession session : sessions) { try { sessionsInformations.add(new SessionInformations(session, false)); } catch (final Exception e) { continue; } } sortSessions(sessionsInformations); return Collections.unmodifiableList(sessionsInformations); } SessionListener();  SessionListener(boolean instanceEnabled); static int getSessionCount(); static long getSessionAgeSum(); static void invalidateAllSessionsExceptCurrentSession(HttpSession currentSession); static void invalidateSession(String sessionId); static List<SessionInformations> getAllSessionsInformations(); static void sortSessions(List<SessionInformations> sessionsInformations); static SessionInformations getSessionInformationsBySessionId(String sessionId); static void bindSession(HttpSession session); static HttpSession getCurrentSession(); static void unbindSession(); @Override void contextInitialized(ServletContextEvent event); @Override void contextDestroyed(ServletContextEvent event); @Override void sessionCreated(HttpSessionEvent event); @Override void sessionDestroyed(HttpSessionEvent event); @Override void sessionDidActivate(HttpSessionEvent event); @Override void sessionWillPassivate(HttpSessionEvent event); @Override String toString(); }
SessionListener implements HttpSessionListener, HttpSessionActivationListener,
		ServletContextListener, Serializable { public static List<SessionInformations> getAllSessionsInformations() { final Collection<HttpSession> sessions = SESSION_MAP_BY_ID.values(); final List<SessionInformations> sessionsInformations = new ArrayList<SessionInformations>( sessions.size()); for (final HttpSession session : sessions) { try { sessionsInformations.add(new SessionInformations(session, false)); } catch (final Exception e) { continue; } } sortSessions(sessionsInformations); return Collections.unmodifiableList(sessionsInformations); } SessionListener();  SessionListener(boolean instanceEnabled); static int getSessionCount(); static long getSessionAgeSum(); static void invalidateAllSessionsExceptCurrentSession(HttpSession currentSession); static void invalidateSession(String sessionId); static List<SessionInformations> getAllSessionsInformations(); static void sortSessions(List<SessionInformations> sessionsInformations); static SessionInformations getSessionInformationsBySessionId(String sessionId); static void bindSession(HttpSession session); static HttpSession getCurrentSession(); static void unbindSession(); @Override void contextInitialized(ServletContextEvent event); @Override void contextDestroyed(ServletContextEvent event); @Override void sessionCreated(HttpSessionEvent event); @Override void sessionDestroyed(HttpSessionEvent event); @Override void sessionDidActivate(HttpSessionEvent event); @Override void sessionWillPassivate(HttpSessionEvent event); @Override String toString(); static final String CSRF_TOKEN_SESSION_NAME; static final String SESSION_COUNTRY_KEY; static final String SESSION_REMOTE_ADDR; static final String SESSION_REMOTE_USER; static final String SESSION_USER_AGENT; }