Package org.springframework.http.support
Class JettyHeadersAdapter
java.lang.Object
org.springframework.http.support.JettyHeadersAdapter
MultiValueMap implementation for wrapping Jetty HTTP headers.- Since:
- 6.1
- Author:
- Rossen Stoyanchev, Juergen Hoeller, Sam Brannen
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionJettyHeadersAdapter(org.eclipse.jetty.http.HttpFields headers) Creates a newJettyHeadersAdapterbased on the givenHttpFieldsinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the given single value to the current list of values for the given key.voidAdd all the values of the given list to the current list of values for the given key.voidaddAll(MultiValueMap<String, String> values) Add all the values of the givenMultiValueMapto the current values.voidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()Return the first value for the given key.booleanisEmpty()keySet()voidvoidSet the given single value under the given key.voidSet the given values under.intsize()Return aMapwith the first values contained in thisMultiValueMap.toString()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllMethods inherited from interface org.springframework.util.MultiValueMap
addIfAbsent
-
Constructor Details
-
JettyHeadersAdapter
public JettyHeadersAdapter(org.eclipse.jetty.http.HttpFields headers) Creates a newJettyHeadersAdapterbased on the givenHttpFieldsinstance.- Parameters:
headers- theHttpFieldsto base this adapter on
-
-
Method Details
-
getFirst
Description copied from interface:MultiValueMapReturn the first value for the given key.- Specified by:
getFirstin interfaceMultiValueMap<String,String> - Parameters:
key- the key- Returns:
- the first value for the specified key, or
nullif none
-
add
Description copied from interface:MultiValueMapAdd the given single value to the current list of values for the given key.- Specified by:
addin interfaceMultiValueMap<String,String> - Parameters:
key- the keyvalue- the value to be added
-
addAll
Description copied from interface:MultiValueMapAdd all the values of the given list to the current list of values for the given key.- Specified by:
addAllin interfaceMultiValueMap<String,String> - Parameters:
key- they keyvalues- the values to be added
-
addAll
Description copied from interface:MultiValueMapAdd all the values of the givenMultiValueMapto the current values.- Specified by:
addAllin interfaceMultiValueMap<String,String> - Parameters:
values- the values to be added
-
set
Description copied from interface:MultiValueMapSet the given single value under the given key.- Specified by:
setin interfaceMultiValueMap<String,String> - Parameters:
key- the keyvalue- the value to set
-
setAll
Description copied from interface:MultiValueMapSet the given values under.- Specified by:
setAllin interfaceMultiValueMap<String,String> - Parameters:
values- the values.
-
toSingleValueMap
Description copied from interface:MultiValueMapReturn aMapwith the first values contained in thisMultiValueMap.- Specified by:
toSingleValueMapin interfaceMultiValueMap<String,String> - Returns:
- a single value representation of this map
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<String,List<String>>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,List<String>>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
toString
-