public class RSocketPayloadReturnValueHandler extends AbstractEncoderMethodReturnValueHandler
AbstractEncoderMethodReturnValueHandler
that
handles
encoded content by wrapping data buffers
as RSocket payloads and by passing those to the MonoProcessor
from the RESPONSE_HEADER
header.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
RESPONSE_HEADER
Message header name that is expected to have a
MonoProcessor
which will receive the Flux<Payload> that represents the response. |
logger
DATA_BUFFER_FACTORY_HEADER
Constructor and Description |
---|
RSocketPayloadReturnValueHandler(java.util.List<Encoder<?>> encoders,
ReactiveAdapterRegistry registry) |
Modifier and Type | Method and Description |
---|---|
private <any> |
getReplyMono(Message<?> message) |
protected <any> |
handleEncodedContent(<any> encodedContent,
MethodParameter returnType,
Message<?> message)
Sub-classes implement this method to handle encoded values in some way
such as creating and sending messages.
|
protected <any> |
handleNoContent(MethodParameter returnType,
Message<?> message)
Invoked for a
null return value, which could mean a void method
or method returning an async type parameterized by void. |
getAdapterRegistry, getEncoders, handleReturnValue, supportsReturnType
public static final java.lang.String RESPONSE_HEADER
MonoProcessor
which will receive the Flux<Payload>
that represents the response.public RSocketPayloadReturnValueHandler(java.util.List<Encoder<?>> encoders, ReactiveAdapterRegistry registry)
protected <any> handleEncodedContent(<any> encodedContent, MethodParameter returnType, Message<?> message)
AbstractEncoderMethodReturnValueHandler
handleEncodedContent
in class AbstractEncoderMethodReturnValueHandler
encodedContent
- the encoded content; each DataBuffer
represents the fully-aggregated, encoded content for one value
(i.e. payload) returned from the HandlerMethod.returnType
- return type of the handler method that produced the datamessage
- the input message handled by the handler methodMono<Void>
for the handlingprotected <any> handleNoContent(MethodParameter returnType, Message<?> message)
AbstractEncoderMethodReturnValueHandler
null
return value, which could mean a void method
or method returning an async type parameterized by void.handleNoContent
in class AbstractEncoderMethodReturnValueHandler
returnType
- return type of the handler method that produced the datamessage
- the input message handled by the handler methodMono<Void>
for the handling