Class RequestAttributes
   The RequestAttributes object is the API for accessing the standard servlet attributes on an HTTP request
   (i.e. ServletRequest.getAttribute(String)).
 
   
Example:
   
Some important methods on this class are:
- RequestHeaders- Methods for retrieving request attributes:
- Methods for overriding request attributes:
- Other methods:
 
   Modifications made to request attributes through the 
See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddDefault(String name, Object value) Adds a default entry to the request attributes.addDefault(List<NamedAttribute> pairs) Adds default entries to the request attributes.addDefault(NamedAttribute... pairs) Adds default entries to the request attributes.addDefault(NamedAttributeMap pairs) Adds default entries to the request attributes.asMap()Returns the request attributes as a map.booleanReturnstrue if the attributes with the specified names are present.booleancontainsAny(String... names) Returnstrue if the attribute with any of the specified names are present.Returns the request attribute with the specified name.getAll()Returns all the attribute on this request.Remove request attributes.remove(NamedAttribute... attributes) Remove request attributes.Sets a request attribute.set(NamedAttribute... attributes) Sets request attributes.toString()
- 
Constructor Details- 
RequestAttributesConstructor.- Parameters:
- req- The request creating this bean.
 
 
- 
- 
Method Details- 
addDefaultAdds default entries to the request attributes.- Parameters:
- pairs- The default entries.
 Can be- null .
- Returns:
- This object.
 
- 
addDefaultAdds default entries to the request attributes.- Parameters:
- pairs- The default entries.
 Can be- null .
- Returns:
- This object.
 
- 
addDefaultAdds default entries to the request attributes.- Parameters:
- pairs- The default entries.
 Can be- null .
- Returns:
- This object.
 
- 
addDefaultAdds a default entry to the request attributes.- Parameters:
- name- The name.
- value- The value.
- Returns:
- This object.
 
- 
getReturns the request attribute with the specified name.- Parameters:
- name- The attribute name.
- Returns:
- The parameter value, or Optional.empty()if it doesn't exist.
 
- 
getAllReturns all the attribute on this request.- Returns:
- All the attribute on this request.
 
- 
containsReturnstrue if the attributes with the specified names are present.- Parameters:
- names- The attribute names. Must not be- null .
- Returns:
- true if the parameters with the specified names are present.
 
- 
containsAnyReturnstrue if the attribute with any of the specified names are present.- Parameters:
- names- The attribute names. Must not be- null .
- Returns:
- true if the attribute with any of the specified names are present.
 
- 
setSets a request attribute.- Parameters:
- name- The attribute name. Must not be- null .
- value- The attribute value.
 Can be- null .
- Returns:
- This object.
 
- 
setSets request attributes.- Parameters:
- attributes- The parameters to set. Must not be- null or contain- null .
- Returns:
- This object.
 
- 
removeRemove request attributes.- Parameters:
- name- The attribute names. Must not be- null .
- Returns:
- This object.
 
- 
removeRemove request attributes.- Parameters:
- attributes- The attributes to remove. Must not be- null .
- Returns:
- This object.
 
- 
asMapReturns the request attributes as a map.- Returns:
- The request attributes as a map.  Never null .
 
- 
toString
 
-