public class MultipartHttpMessageReader extends LoggingCodecSupport implements HttpMessageReader<MultiValueMap<java.lang.String,Part>>
HttpMessageReader
for reading "multipart/form-data"
requests
into a MultiValueMap<String, Part>
.
Note that this reader depends on access to an
HttpMessageReader<Part>
for the actual parsing of multipart content.
The purpose of this reader is to collect the parts into a map.
logger
Constructor and Description |
---|
MultipartHttpMessageReader(HttpMessageReader<Part> partReader) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead(ResolvableType elementType,
MediaType mediaType)
Whether the given object type is supported by this reader.
|
java.util.List<MediaType> |
getReadableMediaTypes()
Return the
MediaType 's that this reader supports. |
reactor.core.publisher.Flux<MultiValueMap<java.lang.String,Part>> |
read(ResolvableType elementType,
ReactiveHttpInputMessage message,
java.util.Map<java.lang.String,java.lang.Object> hints)
Read from the input message and encode to a stream of objects.
|
reactor.core.publisher.Mono<MultiValueMap<java.lang.String,Part>> |
readMono(ResolvableType elementType,
ReactiveHttpInputMessage inputMessage,
java.util.Map<java.lang.String,java.lang.Object> hints)
Read from the input message and encode to a single object.
|
isEnableLoggingRequestDetails, setEnableLoggingRequestDetails
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
read, readMono
public MultipartHttpMessageReader(HttpMessageReader<Part> partReader)
public java.util.List<MediaType> getReadableMediaTypes()
HttpMessageReader
MediaType
's that this reader supports.getReadableMediaTypes
in interface HttpMessageReader<MultiValueMap<java.lang.String,Part>>
public boolean canRead(ResolvableType elementType, @Nullable MediaType mediaType)
HttpMessageReader
canRead
in interface HttpMessageReader<MultiValueMap<java.lang.String,Part>>
elementType
- the type of object to checkmediaType
- the media type for the read (possibly null
)true
if readable, false
otherwisepublic reactor.core.publisher.Flux<MultiValueMap<java.lang.String,Part>> read(ResolvableType elementType, ReactiveHttpInputMessage message, java.util.Map<java.lang.String,java.lang.Object> hints)
HttpMessageReader
read
in interface HttpMessageReader<MultiValueMap<java.lang.String,Part>>
elementType
- the type of objects in the stream which must have been
previously checked via HttpMessageReader.canRead(ResolvableType, MediaType)
message
- the message to read fromhints
- additional information about how to read and decode the inputpublic reactor.core.publisher.Mono<MultiValueMap<java.lang.String,Part>> readMono(ResolvableType elementType, ReactiveHttpInputMessage inputMessage, java.util.Map<java.lang.String,java.lang.Object> hints)
HttpMessageReader
readMono
in interface HttpMessageReader<MultiValueMap<java.lang.String,Part>>
elementType
- the type of objects in the stream which must have been
previously checked via HttpMessageReader.canRead(ResolvableType, MediaType)
inputMessage
- the message to read fromhints
- additional information about how to read and decode the input