io.baltoro.client.SessionManager Maven / Gradle / Ivy
package io.baltoro.client;
import java.util.HashMap;
import java.util.Map;
class SessionManager
{
private static Map sessionMap = new HashMap(1000);
static UserSession createSession(String sessionId)
{
UserSession session = new UserSession(sessionId);
sessionMap.put(sessionId, session);
return session;
}
static UserSession getSession(String sessionId)
{
UserSession session = sessionMap.get(sessionId);
if(session == null)
{
session = new UserSession(sessionId);
sessionMap.put(sessionId, session);
}
return session;
}
static void removeUserSession(String sessionId)
{
sessionMap.remove(sessionId);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy