Class Jaxb2XmlEncoder
java.lang.Object
org.springframework.core.codec.AbstractEncoder<T>
org.springframework.core.codec.AbstractSingleValueEncoder<Object>
org.springframework.http.codec.xml.Jaxb2XmlEncoder
- All Implemented Interfaces:
org.springframework.core.codec.Encoder<Object>
public class Jaxb2XmlEncoder
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.
- Since:
- 5.0
- Author:
- Sebastien Deleuze, Arjen Poutsma
- See Also:
-
Field Summary
Fields inherited from class org.springframework.core.codec.AbstractEncoder
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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) Return the configured processor for customizing Marshaller instances.void
setMarshallerProcessor
(Function<Marshaller, Marshaller> processor) Configure a processor function to customize Marshaller instances.Methods inherited from class org.springframework.core.codec.AbstractSingleValueEncoder
encode
Methods inherited from class org.springframework.core.codec.AbstractEncoder
getEncodableMimeTypes, getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.core.codec.Encoder
getEncodableMimeTypes
-
Constructor Details
-
Jaxb2XmlEncoder
public Jaxb2XmlEncoder()
-
-
Method Details
-
setMarshallerProcessor
Configure a processor function to customize Marshaller instances.- Parameters:
processor
- the function to use- Since:
- 5.1.3
-
getMarshallerProcessor
Return the configured processor for customizing Marshaller instances.- Since:
- 5.1.3
-
canEncode
public boolean canEncode(org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType) -
encode
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, @Nullable org.springframework.util.MimeType mimeType, @Nullable Map<String, Object> hints) - Specified by:
encode
in classorg.springframework.core.codec.AbstractSingleValueEncoder<Object>
-
encodeValue
-