Interface HandlerMethodReturnValueHandler
- All Known Implementing Classes:
AbstractEncoderMethodReturnValueHandler,HandlerMethodReturnValueHandlerComposite,RSocketPayloadReturnValueHandler
public interface HandlerMethodReturnValueHandler
Handle the return value from the invocation of an annotated
Message
handling method.- Since:
- 5.2
- Author:
- Rossen Stoyanchev
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringHeader containing a DataBufferFactory for use in return value handling. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>handleReturnValue(Object returnValue, MethodParameter returnType, Message<?> message) Handle the given return value.booleansupportsReturnType(MethodParameter returnType) Whether the given method return type is supported by this handler.
-
Field Details
-
DATA_BUFFER_FACTORY_HEADER
Header containing a DataBufferFactory for use in return value handling.- See Also:
-
-
Method Details
-
supportsReturnType
Whether the given method return type is supported by this handler.- Parameters:
returnType- the method return type to check- Returns:
trueif this handler supports the supplied return type;falseotherwise
-
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.
-