Package dev.voidframework.web.http
Class Session
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,String>
An HTTP session.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears all data from the session.booleanChecks if the session has been modified.Adds the single value to the session.voidAdds the multiple values to the session.Removes a value from the session.Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
Session
public Session()Build a new instance. -
Session
Build a new instance.- Parameters:
sessionData- Initial session data
-
-
Method Details
-
remove
Removes a value from the session. -
put
Adds the single value to the session. -
putAll
Adds the multiple values to the session. -
clear
public void clear()Clears all data from the session. -
isModified
public boolean isModified()Checks if the session has been modified.- Returns:
trueif the session has been modified, otherwise,false
-