Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.HashMap;
- import java.util.Map;
- public class SessionCache {
- public SessionCache() {
- }
- /*
- * Create object to store sessions
- */
- Map<String, ActiveSessionsObj> cache = new HashMap<String, ActiveSessionsObj>();
- public static class ActiveSessionsObj {
- public ActiveSessionsObj() {
- }
- }
- public void addCache(String key, String user, String password) {
- /* For storing sessions */
- Map<Object,String> cacheData = new HashMap<Object, String>();
- cacheData.put("username", user);
- cacheData.put("password", password);
- cache.put(key, cacheData);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement