StringFormat
Encoder implementations that defer to Kotlin
string serializers.
| Modifier and Type | Field and Description |
|---|---|
| private final CharSequenceEncoder | |
| private final Set |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | canEncode(ResolvableType
the type of elements in the source stream elementType, MimeType the MIME type for the output stream
(can be mimeType)null if not specified)Implements org. Whether the encoder supports the given source element type and the MIME type for the output stream. |
| public Flux | encode(Publisher<?>
the input stream of Objects to encode. If the input should be
encoded as a single value rather than as a stream of elements, an instance of
inputStream, DataBufferFactory Mono should be used.for creating output stream bufferFactory, ResolvableType DataBuffer'sthe expected type of elements in the input stream;
this type must have been previously passed to the elementType, MimeType canEncode
method and it must have returned true.the MIME type for the output content (optional) mimeType, Map<String, Object> additional information about how to encode hints)Implements org. Encode a stream of Objects of type |
| public DataBuffer | encodeValue(Object
the value to be encoded value, DataBufferFactory for creating the output bufferFactory, ResolvableType DataBufferthe type for the value being encoded valueType, MimeType the MIME type for the output content (optional) mimeType, Map<String, Object> additional information about how to encode hints)Overrides default org. Encode an Object of type T to a data buffer. |
| public List | getEncodableMimeTypes()
Implements org. Return the list of MIME types supported by this Encoder. |
| public List | getEncodableMimeTypes(ResolvableType
the type of element to check for encoding elementType)Overrides default org. Return the list of MIME types supported by this Encoder for the given type of element. |
| public void |
| charSequenceEncoder | back to summary |
|---|---|
| private final CharSequenceEncoder charSequenceEncoder | |
| streamingMediaTypes | back to summary |
|---|---|
| private final Set<MimeType> streamingMediaTypes | |
| KotlinSerializationStringEncoder | back to summary |
|---|---|
| protected KotlinSerializationStringEncoder(T format, MimeType... supportedMimeTypes) | |
| canEncode | back to summary |
|---|---|
| public boolean canEncode(ResolvableType elementType, MimeType mimeType) Implements org. Doc from org. Whether the encoder supports the given source element type and the MIME type for the output stream.
| |
| encode | back to summary |
|---|---|
| public Flux Implements org. Doc from org. Encode a stream of Objects of type
| |
| encodeValue | back to summary |
|---|---|
| public DataBuffer encodeValue(Object value, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String, Object> hints) Overrides default org. Doc from org. Encode an Object of type T to a data buffer. This is useful for scenarios, that distinct messages (or events) are encoded and handled individually, in fully aggregated form. By default this method raises
| |
| getEncodableMimeTypes | back to summary |
|---|---|
| public List Implements org. Doc from org. Return the list of MIME types supported by this Encoder. The list may not
apply to every possible target element type and calls to this method should
typically be guarded via | |
| getEncodableMimeTypes | back to summary |
|---|---|
| public List Overrides default org. Doc from org. Return the list of MIME types supported by this Encoder for the given type
of element. This list may differ from the
| |
| setStreamingMediaTypes | back to summary |
|---|---|
| public void setStreamingMediaTypes(Collection<MediaType> streamingMediaTypes) | |