@Internal public class NettyHttpParameters extends java.lang.Object implements MutableHttpParameters
MutableHttpParameters
for Netty.EMPTY
Constructor and Description |
---|
NettyHttpParameters(java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters,
ConversionService<?> conversionService,
java.util.function.BiConsumer<java.lang.CharSequence,java.util.List<java.lang.String>> onChange) |
Modifier and Type | Method and Description |
---|---|
MutableHttpParameters |
add(java.lang.CharSequence name,
java.util.List<java.lang.CharSequence> values)
Adds a new http parameter.
|
java.lang.String |
get(java.lang.CharSequence name)
Get a value without applying any conversion.
|
<T> java.util.Optional<T> |
get(java.lang.CharSequence name,
ArgumentConversionContext<T> conversionContext)
Resolve the given property for the given name.
|
java.util.List<java.lang.String> |
getAll(java.lang.CharSequence name)
Get all the values for the given name without applying conversion.
|
java.util.Set<java.lang.String> |
names() |
java.util.Collection<java.util.List<java.lang.String>> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add
empty, forEach, forEachValue, getFirst, getFirst, getFirst, getFirst, getFirst, isEmpty, iterator, of
asMap, asMap, asProperties, contains, getValue, getValueType, of, subMap, subMap, subMap
get, get, get
public NettyHttpParameters(java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters, ConversionService<?> conversionService, @Nullable java.util.function.BiConsumer<java.lang.CharSequence,java.util.List<java.lang.String>> onChange)
parameters
- The parametersconversionService
- The conversion serviceonChange
- A callback for changespublic java.util.Set<java.lang.String> names()
names
in interface ConvertibleValues<java.util.List<java.lang.String>>
public java.util.Collection<java.util.List<java.lang.String>> values()
values
in interface ConvertibleValues<java.util.List<java.lang.String>>
public java.util.List<java.lang.String> getAll(java.lang.CharSequence name)
ConvertibleMultiValues
getAll
in interface ConvertibleMultiValues<java.lang.String>
name
- The header namepublic java.lang.String get(java.lang.CharSequence name)
ConvertibleMultiValues
get
in interface ConvertibleMultiValues<java.lang.String>
name
- The name of the valueConvertibleMultiValues.getFirst(CharSequence)
public <T> java.util.Optional<T> get(java.lang.CharSequence name, ArgumentConversionContext<T> conversionContext)
ValueResolver
get
in interface ValueResolver<java.lang.CharSequence>
T
- The concrete typename
- The nameconversionContext
- The conversion contextpublic MutableHttpParameters add(java.lang.CharSequence name, java.util.List<java.lang.CharSequence> values)
MutableHttpParameters
add
in interface MutableHttpParameters
name
- the name of the parametervalues
- the values of the parameter