SessionListener implements HttpSessionListener, HttpSessionActivationListener,
		ServletContextListener, Serializable { public static SessionInformations getSessionInformationsBySessionId(String sessionId) { final HttpSession session = getSessionById(sessionId); if (session == null) { return null; } try { return new SessionInformations(session, true); } catch (final Exception e) { return null; } } 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; }
@Test public void testGetSessionInformationsBySessionId() { final HttpSessionEvent sessionEvent = createSessionEvent(); sessionListener.sessionCreated(sessionEvent); final SessionInformations sessionInformations = SessionListener .getSessionInformationsBySessionId(sessionEvent.getSession().getId()); assertEquals("getSessionInformationsBySessionId", sessionEvent.getSession().getId(), sessionInformations.getId()); assertNull("getSessionInformationsBySessionId", SessionListener.getSessionInformationsBySessionId("n'importe quoi")); }