Interface HandlerMethodReturnValueHandler
- All Known Implementing Classes:
AbstractEncoderMethodReturnValueHandler
,HandlerMethodReturnValueHandlerComposite
,RSocketPayloadReturnValueHandler
public interface HandlerMethodReturnValueHandler
Handle the return value from the invocation of an annotatedMessage
handling method.- Since:
- 5.2
- Author:
- Rossen Stoyanchev
Field Summary
Fields Modifier and Type Field Description static String
DATA_BUFFER_FACTORY_HEADER
Header containing a DataBufferFactory for use in return value handling.
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description reactor.core.publisher.Mono<Void>
handleReturnValue(Object returnValue, MethodParameter returnType, Message<?> message)
Handle the given return value.boolean
supportsReturnType(MethodParameter returnType)
Whether the given method return type is supported by this handler.
Field Detail
DATA_BUFFER_FACTORY_HEADER
static final String DATA_BUFFER_FACTORY_HEADER
Header containing a DataBufferFactory for use in return value handling.- See Also:
- Constant Field Values
Method Detail
supportsReturnType
boolean supportsReturnType(MethodParameter returnType)
Whether the given method return type is supported by this handler.- Parameters:
returnType
- the method return type to check- Returns:
true
if this handler supports the supplied return type;false
otherwise
handleReturnValue
reactor.core.publisher.Mono<Void> handleReturnValue(@Nullable Object returnValue, MethodParameter returnType, Message<?> message)
Handle the given return value.- Parameters:
returnValue
- the value returned from the handler methodreturnType
- the type of the return value. This type must have previously been passed tosupportsReturnType(MethodParameter)
and it must have returnedtrue
.- Returns:
Mono<Void>
to indicate when handling is complete.