接口 RSocketRequester.RetrieveSpec
- 所有已知子接口:
RSocketRequester.RequestSpec
- 封闭接口:
- RSocketRequester
public static interface RSocketRequester.RetrieveSpec
Spec to declare the expected output for an RSocket request.- 从以下版本开始:
- 5.2.2
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 <T> reactor.core.publisher.Flux<T>
retrieveFlux(Class<T> dataType)
Perform anrequestStream
or arequestChannel
exchange depending on whether the request input is single or multi-payload.<T> reactor.core.publisher.Flux<T>
retrieveFlux(ParameterizedTypeReference<T> dataTypeRef)
Variant ofretrieveFlux(Class)
for when the dataType has to have a generic type.<T> reactor.core.publisher.Mono<T>
retrieveMono(Class<T> dataType)
Perform arequestResponse
exchange.<T> reactor.core.publisher.Mono<T>
retrieveMono(ParameterizedTypeReference<T> dataTypeRef)
Variant ofretrieveMono(Class)
for when the dataType has to have a generic type.reactor.core.publisher.Mono<Void>
send()
Perform afireAndForget
.
方法详细资料
retrieveMono
<T> reactor.core.publisher.Mono<T> retrieveMono(Class<T> dataType)
Perform arequestResponse
exchange.If the return type is
Mono<Void>
, theMono
will complete after all data is consumed.Note: This method will raise an error if the request payload is a multi-valued
Publisher
as there is no many-to-one RSocket interaction.- 类型参数:
T
- parameter for the expected data type- 参数:
dataType
- the expected data type for the response- 返回:
- the decoded response
retrieveMono
<T> reactor.core.publisher.Mono<T> retrieveMono(ParameterizedTypeReference<T> dataTypeRef)
Variant ofretrieveMono(Class)
for when the dataType has to have a generic type. SeeParameterizedTypeReference
.
retrieveFlux
<T> reactor.core.publisher.Flux<T> retrieveFlux(Class<T> dataType)
Perform anrequestStream
or arequestChannel
exchange depending on whether the request input is single or multi-payload.If the return type is
Flux<Void>
, theFlux
will complete after all data is consumed.- 类型参数:
T
- parameterize the expected type of values- 参数:
dataType
- the expected type for values in the response- 返回:
- the decoded response
retrieveFlux
<T> reactor.core.publisher.Flux<T> retrieveFlux(ParameterizedTypeReference<T> dataTypeRef)
Variant ofretrieveFlux(Class)
for when the dataType has to have a generic type. SeeParameterizedTypeReference
.