1 20 package org.enhydra.barracuda.plankton.http; 21 22 import java.util.*; 23 import java.lang.ref.*; 24 import javax.servlet.*; 25 import javax.servlet.http.*; 26 27 import org.apache.log4j.*; 28 29 import org.enhydra.barracuda.plankton.data.*; 30 31 40 public class SessionManager { 41 42 protected static Logger logger = Logger.getLogger(SessionManager.class.getName()); 43 44 48 public static HttpSession getSession(String sessionID) { 49 return (HttpSession) getAllSessions().get(sessionID); 50 } 51 52 60 public static SoftHashMap getAllSessions() { 61 return ObjectRepository.getRawSessionStore(); 62 } 63 64 67 public static void invalidateSession() { 68 ObjectRepository.invalidateSession(); 69 } 70 71 75 public static void invalidateSession(String sessionID) { 76 ObjectRepository.invalidateSession(sessionID); 77 } 78 79 83 public static void invalidateAllSessions() { 84 ObjectRepository.invalidateAllSessions(); 85 } 86 87 88 89 90 } 91 | Popular Tags |