Top Description Fields Constructors Methods
org.springframework.web.service.invoker

public Class RequestPartArgumentResolver

extends AbstractNamedValueArgumentResolver
Class Inheritance
Imports
org.reactivestreams.Publisher, org.springframework.core.MethodParameter, .ParameterizedTypeReference, .ReactiveAdapter, .ReactiveAdapterRegistry, org.springframework.http.HttpEntity, .HttpHeaders, org.springframework.http.codec.multipart.Part, org.springframework.lang.Nullable, org.springframework.util.Assert, .ClassUtils, org.springframework.web.bind.annotation.RequestPart, org.springframework.web.multipart.MultipartFile

HttpServiceArgumentResolver for @RequestPart annotated arguments.

The argument may be:

Author
Rossen Stoyanchev
Since
6.0

Field Summary

Modifier and TypeField and Description
private final ReactiveAdapterRegistry
private static final boolean
Inherited from org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver:
logger

Constructor Summary

AccessConstructor and Description
public
RequestPartArgumentResolver(HttpExchangeAdapter exchangeAdapter)

Constructor with a HttpExchangeAdapter, for access to config settings.

Method Summary

Modifier and TypeMethod and Description
protected void
addRequestValue(String
the request value name
name
,
Object
the value
value
,
MethodParameter
the method parameter type, nested if Map, List/array, or Optional
parameter
,
HttpRequestValues.Builder
builder to add the request value to
requestValues
)

Implements abstract org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver.addRequestValue.

Add the given, single request value.

private static ParameterizedTypeReference<Object>
protected AbstractNamedValueArgumentResolver.NamedValueInfo
createNamedValueInfo(MethodParameter parameter)

Implements abstract org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver.createNamedValueInfo.

Return information about the request value, or null if the parameter does not represent a request value of interest.

private static Object
toHttpEntity(String name, MultipartFile multipartFile)

Inherited from org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver:
resolve

Field Detail

reactiveAdapterRegistryback to summary
private final ReactiveAdapterRegistry reactiveAdapterRegistry
Annotations
@Nullable
REACTOR_PRESENTback to summary
private static final boolean REACTOR_PRESENT

Constructor Detail

RequestPartArgumentResolverback to summary
public RequestPartArgumentResolver(HttpExchangeAdapter exchangeAdapter)

Constructor with a HttpExchangeAdapter, for access to config settings.

Since
6.1

Method Detail

addRequestValueback to summary
protected void addRequestValue(String name, Object value, MethodParameter parameter, HttpRequestValues.Builder requestValues)

Implements abstract org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver.addRequestValue.

Doc from org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver.addRequestValue.

Add the given, single request value. This may be called multiples times if the request value is multivalued.

If the resolver was created with a ConversionService, the value will have been converted to a String and may be cast down.

Parameters
name:String

the request value name

value:Object

the value

parameter:MethodParameter

the method parameter type, nested if Map, List/array, or Optional

requestValues:HttpRequestValues.Builder

builder to add the request value to

Annotations
@Override
asParameterizedTypeRefback to summary
private static ParameterizedTypeReference<Object> asParameterizedTypeRef(MethodParameter nestedParam)
createNamedValueInfoback to summary
protected AbstractNamedValueArgumentResolver.NamedValueInfo createNamedValueInfo(MethodParameter parameter)

Implements abstract org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver.createNamedValueInfo.

Doc from org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver.createNamedValueInfo.

Return information about the request value, or null if the parameter does not represent a request value of interest.

Annotations
@Override
toHttpEntityback to summary
private static Object toHttpEntity(String name, MultipartFile multipartFile)