Top Description Fields Methods
org.springframework.messaging.handler.invocation.reactive

public Interface HandlerMethodReturnValueHandler

Known Direct Implementers
org.springframework.messaging.handler.invocation.reactive.HandlerMethodReturnValueHandlerComposite, org.springframework.messaging.handler.invocation.reactive.AbstractEncoderMethodReturnValueHandler
Imports
reactor.core.publisher.Mono, org.springframework.core.MethodParameter, org.springframework.lang.Nullable, org.springframework.messaging.Message

Handle the return value from the invocation of an annotated Message handling method.
Author
Rossen Stoyanchev
Since
5.2

Field Summary

Modifier and TypeField and Description
public static final String
DATA_BUFFER_FACTORY_HEADER

Header containing a DataBufferFactory for use in return value handling.

Method Summary

Modifier and TypeMethod and Description
public Mono<Void>

Returns:

Mono<Void> to indicate when handling is complete.
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 supportsReturnType(MethodParameter) and it must have returned true.
returnType
,
Message<?> message)

Handle the given return value.

public boolean

Returns:

true if this handler supports the supplied return type; false otherwise
supportsReturnType
(MethodParameter
the method return type to check
returnType
)

Whether the given method return type is supported by this handler.

Field Detail

DATA_BUFFER_FACTORY_HEADERback to summary
public static final String DATA_BUFFER_FACTORY_HEADER

Header containing a DataBufferFactory for use in return value handling.

Method Detail

handleReturnValueback to summary
public Mono<Void> handleReturnValue(Object returnValue, MethodParameter returnType, Message<?> message)

Handle the given return value.

Parameters
returnValue:Object

the value returned from the handler method

returnType:MethodParameter

the type of the return value. This type must have previously been passed to supportsReturnType(MethodParameter) and it must have returned true.

Returns:Mono<Void>

Mono<Void> to indicate when handling is complete.

supportsReturnTypeback to summary
public boolean supportsReturnType(MethodParameter returnType)

Whether the given method return type is supported by this handler.

Parameters
returnType:MethodParameter

the method return type to check

Returns:boolean

true if this handler supports the supplied return type; false otherwise