Package org.pac4j.undertow.context
Class RequestAttributesMap
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>
A map of request attributes stored in Undertow's HttpServerExchange as an attachment.
This is a simple extension of a HashMap that adds no custom logic, but it must be
a separate class, because Undertow uses class-based AttachmentKey to distinguish
attachment types.
- Since:
- 4.1.0
- Author:
- Igor Lobanov
- 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 TypeMethodDescriptionstatic RequestAttributesMapgetOrInitialize(io.undertow.server.HttpServerExchange exchange) Returns an instance of RequestAttributesMap stored in a given Undertow's HttpServerExchange object as an attachment.Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
RequestAttributesMap
public RequestAttributesMap()
-
-
Method Details
-
getOrInitialize
Returns an instance of RequestAttributesMap stored in a given Undertow's HttpServerExchange object as an attachment. If there had not been such attachment in the exchange, it is created.- Parameters:
exchange- the Undertow exchange- Returns:
- the request attributes map
-