com.hibegin.http.server.web.session.HttpSession Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simplewebserver Show documentation
Show all versions of simplewebserver Show documentation
Simple, flexible, less dependent, more extended. Less memory footprint, can quickly build Web project.
Can quickly run embedded, Android devices
package com.hibegin.http.server.web.session;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
public class HttpSession {
private String sessionId;
private Map attrMap = Collections.synchronizedMap(new HashMap());
public HttpSession(String sessionID) {
this.sessionId = sessionID;
}
public void setAttr(String name, Object value) {
attrMap.put(name, value);
}
public String getSessionId() {
return sessionId;
}
public Object getAttr(String name) {
return attrMap.get(name);
}
public void removeAttr(String name) {
attrMap.remove(name);
}
public void invalidate() {
SessionUtil.sessionMap.remove(sessionId);
}
public Map getAttrMap() {
return attrMap;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy