@Override public void storeSession(String s, Session session) { if ( !session.getId().equals( SESSION_ID ) ) getSessionStore().storeSession(s, session); }
/** * Create a new {@link Session} and store it at the main storage. * * @param sessionId * @param exchange * @return */ default Session createAndStoreNewSession(String sessionId, HttpServerExchange exchange, SessionIdManager sessionIdManager ){ Session session = new DefaultSession( sessionId ); storeSession(session.getId(), session); sessionIdManager.attachSessionId(exchange, session.getId()); return session; }