Package org.bremersee.http.codec.xml
Class ReactiveJaxbEncoder
- java.lang.Object
-
- org.springframework.core.codec.AbstractEncoder<T>
-
- org.springframework.core.codec.AbstractSingleValueEncoder<Object>
-
- org.bremersee.http.codec.xml.ReactiveJaxbEncoder
-
- All Implemented Interfaces:
org.springframework.core.codec.Encoder<Object>
@Validated public class ReactiveJaxbEncoder extends org.springframework.core.codec.AbstractSingleValueEncoder<Object>
Encode from single value to a byte stream containing XML elements.@XmlElements
and@XmlElement
can be used to specify how collections should be marshalled.The encoding parts are taken from
Jaxb2XmlEncoder
.- Author:
- Sebastien Deleuze, Arjen Poutsma, Christian Bremer
-
-
Constructor Summary
Constructors Constructor Description ReactiveJaxbEncoder(org.bremersee.xml.JaxbContextBuilder jaxbContextBuilder)
Instantiates a new reactive jaxb encoder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canEncode(org.springframework.core.ResolvableType elementType, org.springframework.util.MimeType mimeType)
protected reactor.core.publisher.Flux<org.springframework.core.io.buffer.DataBuffer>
encode(Object value, org.springframework.core.io.buffer.DataBufferFactory bufferFactory, org.springframework.core.ResolvableType valueType, org.springframework.util.MimeType mimeType, Map<String,Object> hints)
org.springframework.core.io.buffer.DataBuffer
encodeValue(Object value, org.springframework.core.io.buffer.DataBufferFactory bufferFactory, org.springframework.core.ResolvableType valueType, org.springframework.util.MimeType mimeType, Map<String,Object> hints)
-
Methods inherited from class org.springframework.core.codec.AbstractEncoder
getEncodableMimeTypes, getLogger, setLogger
-
-
-
-
Method Detail
-
canEncode
public boolean canEncode(@NonNull org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType)
-
encode
@NonNull protected reactor.core.publisher.Flux<org.springframework.core.io.buffer.DataBuffer> encode(@NonNull Object value, @NonNull org.springframework.core.io.buffer.DataBufferFactory bufferFactory, @NonNull org.springframework.core.ResolvableType valueType, @Nullable org.springframework.util.MimeType mimeType, @Nullable Map<String,Object> hints)
- Specified by:
encode
in classorg.springframework.core.codec.AbstractSingleValueEncoder<Object>
-
encodeValue
@NonNull public org.springframework.core.io.buffer.DataBuffer encodeValue(@NonNull Object value, @NonNull org.springframework.core.io.buffer.DataBufferFactory bufferFactory, @NonNull org.springframework.core.ResolvableType valueType, @Nullable org.springframework.util.MimeType mimeType, @Nullable Map<String,Object> hints)
-
-