1 3 package com.sslexplorer.vfs.webdav; 4 5 import java.util.HashMap ; 6 7 13 public class DAVSessionStore { 14 private HashMap sessions; 15 private static DAVSessionStore instance; 16 17 private DAVSessionStore() { 18 sessions = new HashMap (); 19 } 20 21 public DAVSession getSession(String id) { 22 return (DAVSession)sessions.get(id); 23 } 24 25 public void addSession(DAVSession session) { 26 sessions.put(session.getId(), session); 27 } 28 29 public void removeSession(String id) { 30 sessions.remove(id); 31 } 32 33 public static DAVSessionStore getInstance() { 34 if(instance == null) { 35 instance = new DAVSessionStore(); 36 } 37 return instance; 38 } 39 40 } 41 | Popular Tags |