Package org.apache.struts2.dispatcher
Class RequestMap
- All Implemented Interfaces:
Serializable
,Map<String,
Object>
A simple implementation of the
Map
interface to handle a collection of request attributes.- 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
ConstructorsConstructorDescriptionRequestMap
(jakarta.servlet.http.HttpServletRequest request) Saves the request to use as the backing for getting and setting values -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Removes all attributes from the request as well as clears entries in this map.entrySet()
Returns a Set of attributes from the http request.Returns the request attribute associated with the given key or null if it doesn't exist.Saves an attribute in the request.Removes the specified request attribute.Methods inherited from class java.util.AbstractMap
clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
RequestMap
public RequestMap(jakarta.servlet.http.HttpServletRequest request) Saves the request to use as the backing for getting and setting values- Parameters:
request
- the http servlet request.
-
-
Method Details
-
clear
public void clear()Removes all attributes from the request as well as clears entries in this map. -
entrySet
Returns a Set of attributes from the http request. -
get
Returns the request attribute associated with the given key or null if it doesn't exist. -
put
Saves an attribute in the request. -
remove
Removes the specified request attribute.
-