public class Jaxb2XmlDecoder extends AbstractDecoder<Object>
Object
s (POJOs).Jaxb2XmlEncoder
logger
Constructor and Description |
---|
Jaxb2XmlDecoder() |
Modifier and Type | Method and Description |
---|---|
boolean |
canDecode(ResolvableType elementType,
MimeType mimeType)
Whether the decoder supports the given target element type and the MIME
type of the source stream.
|
reactor.core.publisher.Flux<Object> |
decode(org.reactivestreams.Publisher<DataBuffer> inputStream,
ResolvableType elementType,
MimeType mimeType,
Map<String,Object> hints)
Decode a
DataBuffer input stream into a Flux of T . |
reactor.core.publisher.Mono<Object> |
decodeToMono(org.reactivestreams.Publisher<DataBuffer> inputStream,
ResolvableType elementType,
MimeType mimeType,
Map<String,Object> hints)
Decode a
DataBuffer input stream into a Mono of T . |
Function<Unmarshaller,Unmarshaller> |
getUnmarshallerProcessor()
Return the configured processor for customizing Unmarshaller instances.
|
void |
setUnmarshallerProcessor(Function<Unmarshaller,Unmarshaller> processor)
Configure a processor function to customize Unmarshaller instances.
|
getDecodableMimeTypes, getLogger, setLogger
public void setUnmarshallerProcessor(Function<Unmarshaller,Unmarshaller> processor)
processor
- the function to usepublic Function<Unmarshaller,Unmarshaller> getUnmarshallerProcessor()
public boolean canDecode(ResolvableType elementType, @Nullable MimeType mimeType)
Decoder
canDecode
in interface Decoder<Object>
canDecode
in class AbstractDecoder<Object>
elementType
- the target element type for the output streammimeType
- the mime type associated with the stream to decode
(can be null
if not specified)true
if supported, false
otherwisepublic reactor.core.publisher.Flux<Object> decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String,Object> hints)
Decoder
DataBuffer
input stream into a Flux of T
.inputStream
- the DataBuffer
input stream to decodeelementType
- the expected type of elements in the output stream;
this type must have been previously passed to the Decoder.canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType)
method and it must have returned true
.mimeType
- the MIME type associated with the input stream (optional)hints
- additional information about how to do encodepublic reactor.core.publisher.Mono<Object> decodeToMono(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String,Object> hints)
Decoder
DataBuffer
input stream into a Mono of T
.decodeToMono
in interface Decoder<Object>
decodeToMono
in class AbstractDecoder<Object>
inputStream
- the DataBuffer
input stream to decodeelementType
- the expected type of elements in the output stream;
this type must have been previously passed to the Decoder.canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType)
method and it must have returned true
.mimeType
- the MIME type associated with the input stream (optional)hints
- additional information about how to do encode