All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hibegin.http.server.web.session.HttpSession Maven / Gradle / Ivy

Go to download

Simple, flexible, less dependent, more extended. Less memory footprint, can quickly build Web project. Can quickly run embedded, Android devices

There is a newer version: 0.3.162
Show newest version
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