Flux<DataBuffer> through the configured Encoders.
Subclasses must implement the abstract method
handleEncodedContent to handle the resulting encoded content.
This handler should be ordered last since its supportsReturnType
returns true for any method parameter type.
| Modifier and Type | Field and Description |
|---|---|
| private final ReactiveAdapterRegistry | |
| private static final String | |
| private final List | |
| protected final Log | |
| private static final ResolvableType | |
| private static final ResolvableType |
| Access | Constructor and Description |
|---|---|
| protected | AbstractEncoderMethodReturnValueHandler(List<Encoder<?>> encoders, ReactiveAdapterRegistry registry)
|
| Modifier and Type | Method and Description |
|---|---|
| private Flux | encodeContent(Object content, MethodParameter returnType, DataBufferFactory bufferFactory, MimeType mimeType, Map<String, Object> hints)
|
| private <T> DataBuffer | encodeValue(Object element, ResolvableType elementType, Encoder<T> encoder, DataBufferFactory bufferFactory, MimeType mimeType, Map<String, Object> hints)
|
| public ReactiveAdapterRegistry | |
| private ResolvableType | |
| private <T> Encoder | |
| public List | |
| protected abstract Mono | Returns: completionMono<Void> for the handlingthe encoded content; each encodedContent, MethodParameter DataBuffer
represents the fully-aggregated, encoded content for one value
(i.e. payload) returned from the HandlerMethod.return type of the handler method that produced the data returnType, Message<?> the input message handled by the handler method message)Subclasses implement this method to handle encoded values in some way such as creating and sending messages. |
| protected abstract Mono | Returns: completionMono<Void> for the handlingreturn type of the handler method that produced the data returnType, Message<?> the input message handled by the handler method message)Invoked for a |
| public Mono | handleReturnValue(Object
the value returned from the handler method returnValue, MethodParameter the type of the return value. This type must have previously
been passed to returnType, Message<?> message)supportsReturnType(MethodParameter)
and it must have returned true.Implements org. |
| public boolean | supportsReturnType(MethodParameter
the method return type to check returnType)Implements org. |
| adapterRegistry | back to summary |
|---|---|
| private final ReactiveAdapterRegistry adapterRegistry | |
| COROUTINES_FLOW_CLASS_NAME | back to summary |
|---|---|
| private static final String COROUTINES_FLOW_CLASS_NAME | |
| encoders | back to summary |
|---|---|
| private final List<Encoder<?>> encoders | |
| logger | back to summary |
|---|---|
| protected final Log logger | |
| OBJECT_RESOLVABLE_TYPE | back to summary |
|---|---|
| private static final ResolvableType OBJECT_RESOLVABLE_TYPE | |
| VOID_RESOLVABLE_TYPE | back to summary |
|---|---|
| private static final ResolvableType VOID_RESOLVABLE_TYPE | |
| AbstractEncoderMethodReturnValueHandler | back to summary |
|---|---|
| protected AbstractEncoderMethodReturnValueHandler(List<Encoder<?>> encoders, ReactiveAdapterRegistry registry) | |
| encodeContent | back to summary |
|---|---|
| private Flux | |
| encodeValue | back to summary |
|---|---|
private <T> DataBuffer encodeValue(Object element, ResolvableType elementType, Encoder<T> encoder, DataBufferFactory bufferFactory, MimeType mimeType, Map<String, Object> hints)
| |
| getAdapterRegistry | back to summary |
|---|---|
| public ReactiveAdapterRegistry getAdapterRegistry() The configured adapter registry. | |
| getElementType | back to summary |
|---|---|
| private ResolvableType getElementType(ReactiveAdapter adapter, ResolvableType type) | |
| getEncoder | back to summary |
|---|---|
private <T> Encoder
| |
| getEncoders | back to summary |
|---|---|
| public List The configured encoders. | |
| handleEncodedContent | back to summary |
|---|---|
| protected abstract Mono Subclasses implement this method to handle encoded values in some way such as creating and sending messages.
| |
| handleNoContent | back to summary |
|---|---|
| protected abstract Mono Invoked for a
| |
| handleReturnValue | back to summary |
|---|---|
| public Mono Implements org. Handle the given return value.
| |
| supportsReturnType | back to summary |
|---|---|
| public boolean supportsReturnType(MethodParameter returnType) Implements org. Whether the given method return type is supported by this handler.
| |