Interface RSocketRequester.RetrieveSpec
- All Known Subinterfaces:
RSocketRequester.RequestSpec
- Enclosing interface:
- RSocketRequester
public static interface RSocketRequester.RetrieveSpec
Spec to declare the expected output for an RSocket request.
- Since:
- 5.2.2
-
Method Summary
Modifier and TypeMethodDescription<T> reactor.core.publisher.Flux<T>retrieveFlux(Class<T> dataType) Perform anrequestStreamor arequestChannelexchange 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 arequestResponseexchange.<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 afireAndForgetsending the provided data and metadata.
-
Method Details
-
send
reactor.core.publisher.Mono<Void> send()Perform afireAndForgetsending the provided data and metadata.- Returns:
- a completion that indicates if the payload was sent successfully or not. Note, however that is a one-way send and there is no indication of whether or how the even was handled on the remote end.
-
retrieveMono
Perform arequestResponseexchange.If the return type is
Mono<Void>, theMonowill complete after all data is consumed.Note: This method will raise an error if the request payload is a multivalued
Publisheras there is no many-to-one RSocket interaction.- Type Parameters:
T- parameter for the expected data type- Parameters:
dataType- the expected data type for the response- Returns:
- the decoded response
-
retrieveMono
Variant ofretrieveMono(Class)for when the dataType has to have a generic type. SeeParameterizedTypeReference. -
retrieveFlux
Perform anrequestStreamor arequestChannelexchange depending on whether the request input is single or multi-payload.If the return type is
Flux<Void>, theFluxwill complete after all data is consumed.- Type Parameters:
T- parameterize the expected type of values- Parameters:
dataType- the expected type for values in the response- Returns:
- the decoded response
-
retrieveFlux
Variant ofretrieveFlux(Class)for when the dataType has to have a generic type. SeeParameterizedTypeReference.
-