Class BodyExtractors
java.lang.Object
org.springframework.web.reactive.function.BodyExtractors
Static factory methods for 
BodyExtractor implementations.- Since:
- 5.0
- Author:
- Arjen Poutsma, Sebastien Deleuze, Rossen Stoyanchev, Brian Clozel
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic BodyExtractor<reactor.core.publisher.Flux<DataBuffer>,ReactiveHttpInputMessage> Extractor that returns the rawDataBuffers.static <T> BodyExtractor<reactor.core.publisher.Flux<T>,ReactiveHttpInputMessage> Extractor to decode the input content intoFlux<T>.static <T> BodyExtractor<reactor.core.publisher.Flux<T>,ReactiveHttpInputMessage> toFlux(ParameterizedTypeReference<T> typeRef) Variant oftoFlux(Class)for type information with generics.static BodyExtractor<reactor.core.publisher.Mono<MultiValueMap<String,String>>, ReactiveHttpInputMessage> Extractor to read form data intoMultiValueMap<String, String>.static <T> BodyExtractor<reactor.core.publisher.Mono<T>,ReactiveHttpInputMessage> Extractor to decode the input content intoMono<T>.static <T> BodyExtractor<reactor.core.publisher.Mono<T>,ReactiveHttpInputMessage> toMono(ParameterizedTypeReference<T> elementTypeRef) Variant oftoMono(Class)for type information with generics.static BodyExtractor<reactor.core.publisher.Mono<MultiValueMap<String,Part>>, ServerHttpRequest> Extractor to read multipart data into aMultiValueMap<String, Part>.static BodyExtractor<reactor.core.publisher.Flux<Part>,ServerHttpRequest> toParts()Extractor to read multipart data intoFlux<Part>.
- 
Constructor Details- 
BodyExtractorspublic BodyExtractors()
 
- 
- 
Method Details- 
toMonopublic static <T> BodyExtractor<reactor.core.publisher.Mono<T>,ReactiveHttpInputMessage> toMono(Class<? extends T> elementClass) Extractor to decode the input content intoMono<T>.- Type Parameters:
- T- the element type to decode to
- Parameters:
- elementClass- the class of the element type to decode to
- Returns:
- BodyExtractorfor- Mono<T>
 
- 
toMonopublic static <T> BodyExtractor<reactor.core.publisher.Mono<T>,ReactiveHttpInputMessage> toMono(ParameterizedTypeReference<T> elementTypeRef) Variant oftoMono(Class)for type information with generics.- Type Parameters:
- T- the element type to decode to
- Parameters:
- elementTypeRef- the type reference for the type to decode to
- Returns:
- BodyExtractorfor- Mono<T>
 
- 
toFluxpublic static <T> BodyExtractor<reactor.core.publisher.Flux<T>,ReactiveHttpInputMessage> toFlux(Class<? extends T> elementClass) Extractor to decode the input content intoFlux<T>.- Type Parameters:
- T- the element type to decode to
- Parameters:
- elementClass- the class of the element type to decode to
- Returns:
- BodyExtractorfor- Flux<T>
 
- 
toFluxpublic static <T> BodyExtractor<reactor.core.publisher.Flux<T>,ReactiveHttpInputMessage> toFlux(ParameterizedTypeReference<T> typeRef) Variant oftoFlux(Class)for type information with generics.- Type Parameters:
- T- the element type to decode to
- Parameters:
- typeRef- the type reference for the type to decode to
- Returns:
- BodyExtractorfor- Flux<T>
 
- 
toFormDatapublic static BodyExtractor<reactor.core.publisher.Mono<MultiValueMap<String,String>>, toFormData()ReactiveHttpInputMessage> Extractor to read form data intoMultiValueMap<String, String>.As of 5.1 this method can also be used on the client side to read form data from a server response (e.g. OAuth). - Returns:
- BodyExtractorfor form data
 
- 
toMultipartDatapublic static BodyExtractor<reactor.core.publisher.Mono<MultiValueMap<String,Part>>, toMultipartData()ServerHttpRequest> Extractor to read multipart data into aMultiValueMap<String, Part>.Note: that resources used for part handling, like storage for the uploaded files, is not deleted automatically, but should be done via Part.delete().- Returns:
- BodyExtractorfor multipart data
 
- 
toPartsExtractor to read multipart data intoFlux<Part>.Note: that resources used for part handling, like storage for the uploaded files, is not deleted automatically, but should be done via Part.delete().- Returns:
- BodyExtractorfor multipart request parts
 
- 
toDataBufferspublic static BodyExtractor<reactor.core.publisher.Flux<DataBuffer>,ReactiveHttpInputMessage> toDataBuffers()Extractor that returns the rawDataBuffers.Note: the data buffers should be releasedafter being used.- Returns:
- BodyExtractorfor data buffers
 
 
-