public abstract class AbstractSingleValueEncoder<T> extends AbstractEncoder<T>
Encoder
classes that can only deal with a single value.| Constructor and Description |
|---|
AbstractSingleValueEncoder(MimeType... supportedMimeTypes) |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Flux<DataBuffer> |
encode(org.reactivestreams.Publisher<? extends T> inputStream,
DataBufferFactory bufferFactory,
ResolvableType elementType,
MimeType mimeType,
Object... hints)
Encode a stream of Objects of type
T into a DataBuffer
output stream. |
protected abstract reactor.core.publisher.Flux<DataBuffer> |
encode(T t,
DataBufferFactory dataBufferFactory,
ResolvableType type,
MimeType mimeType,
Object... hints)
Encode
T to an output DataBuffer stream. |
canEncode, getEncodableMimeTypespublic AbstractSingleValueEncoder(MimeType... supportedMimeTypes)
public final reactor.core.publisher.Flux<DataBuffer> encode(org.reactivestreams.Publisher<? extends T> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Object... hints)
EncoderT into a DataBuffer
output stream.inputStream - the input stream of Objects to encodebufferFactory - for creating output stream DataBuffer'selementType - the expected type of elements in the input stream;
this type must have been previously passed to the Encoder.canEncode(org.springframework.core.ResolvableType, org.springframework.util.MimeType, java.lang.Object...)
method and it must have returned true.mimeType - the MIME type for the output streamhints - additional information about how to do encode, optionalprotected abstract reactor.core.publisher.Flux<DataBuffer> encode(T t, DataBufferFactory dataBufferFactory, ResolvableType type, MimeType mimeType, Object... hints) throws Exception
T to an output DataBuffer stream.t - the value to processdataBufferFactory - a buffer factory used to create the outputtype - the stream element type to processmimeType - the mime type to processhints - Additional information about how to do decode, optionalException - in case of errors