类 RSocketPayloadReturnValueHandler
- java.lang.Object
- org.springframework.messaging.handler.invocation.reactive.AbstractEncoderMethodReturnValueHandler
- org.springframework.messaging.rsocket.annotation.support.RSocketPayloadReturnValueHandler
- 所有已实现的接口:
HandlerMethodReturnValueHandler
public class RSocketPayloadReturnValueHandler extends AbstractEncoderMethodReturnValueHandler
Extension ofAbstractEncoderMethodReturnValueHandler
thathandles
encoded content by wrapping data buffers as RSocket payloads and by passing those to theMonoProcessor
from theRESPONSE_HEADER
header.- 从以下版本开始:
- 5.2
- 作者:
- Rossen Stoyanchev
字段概要
字段 修饰符和类型 字段 说明 static String
RESPONSE_HEADER
Message header name that is expected to have aMonoProcessor
which will receive theFlux<Payload>
that represents the response.从类继承的字段 org.springframework.messaging.handler.invocation.reactive.AbstractEncoderMethodReturnValueHandler
logger
从接口继承的字段 org.springframework.messaging.handler.invocation.reactive.HandlerMethodReturnValueHandler
DATA_BUFFER_FACTORY_HEADER
构造器概要
构造器 构造器 说明 RSocketPayloadReturnValueHandler(List<Encoder<?>> encoders, ReactiveAdapterRegistry registry)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected reactor.core.publisher.Mono<Void>
handleEncodedContent(reactor.core.publisher.Flux<DataBuffer> encodedContent, MethodParameter returnType, Message<?> message)
Subclasses implement this method to handle encoded values in some way such as creating and sending messages.protected reactor.core.publisher.Mono<Void>
handleNoContent(MethodParameter returnType, Message<?> message)
Invoked for anull
return value, which could mean a void method or method returning an async type parameterized by void.从类继承的方法 org.springframework.messaging.handler.invocation.reactive.AbstractEncoderMethodReturnValueHandler
getAdapterRegistry, getEncoders, handleReturnValue, supportsReturnType
字段详细资料
RESPONSE_HEADER
public static final String RESPONSE_HEADER
Message header name that is expected to have aMonoProcessor
which will receive theFlux<Payload>
that represents the response.- 另请参阅:
- 常量字段值
构造器详细资料
RSocketPayloadReturnValueHandler
public RSocketPayloadReturnValueHandler(List<Encoder<?>> encoders, ReactiveAdapterRegistry registry)
方法详细资料
handleEncodedContent
protected reactor.core.publisher.Mono<Void> handleEncodedContent(reactor.core.publisher.Flux<DataBuffer> encodedContent, MethodParameter returnType, Message<?> message)
Subclasses implement this method to handle encoded values in some way such as creating and sending messages.- 指定者:
handleEncodedContent
在类中AbstractEncoderMethodReturnValueHandler
- 参数:
encodedContent
- the encoded content; eachDataBuffer
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 method- 返回:
- completion
Mono<Void>
for the handling
handleNoContent
protected reactor.core.publisher.Mono<Void> handleNoContent(MethodParameter returnType, Message<?> message)
Invoked for anull
return value, which could mean a void method or method returning an async type parameterized by void.- 指定者:
handleNoContent
在类中AbstractEncoderMethodReturnValueHandler
- 参数:
returnType
- return type of the handler method that produced the datamessage
- the input message handled by the handler method- 返回:
- completion
Mono<Void>
for the handling