org.springframework.messaging.rsocket

## 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

All Methods Instance Methods Abstract Methods
`<T> reactor.core.publisher.Flux<T>` `retrieveFlux(Class<T> dataType)` Perform an `requestStream` or a `requestChannel` exchange depending on whether the request input is single or multi-payload.
`<T> reactor.core.publisher.Flux<T>` `retrieveFlux(org.springframework.core.ParameterizedTypeReference<T> dataTypeRef)` Variant of `retrieveFlux(Class)` for when the dataType has to have a generic type.
`<T> reactor.core.publisher.Mono<T>` `retrieveMono(Class<T> dataType)` Perform a `requestResponse` exchange.
`<T> reactor.core.publisher.Mono<T>` `retrieveMono(org.springframework.core.ParameterizedTypeReference<T> dataTypeRef)` Variant of `retrieveMono(Class)` for when the dataType has to have a generic type.
`reactor.core.publisher.Mono<Void>` `send()` Perform a `fireAndForget`.

### Method Detail

#### send

    reactor.core.publisher.Mono<Void> send()

Perform a `fireAndForget`.

#### retrieveMono

    <T> reactor.core.publisher.Mono<T> retrieveMono(Class<T> dataType)

Perform a `requestResponse` exchange.

If the return type is `Mono<Void>`, the `Mono` 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.

Type Parameters:
  `T` - parameter for the expected data type
Parameters:
  `dataType` - the expected data type for the response
Returns:
  the decoded response

#### retrieveMono

    <T> reactor.core.publisher.Mono<T> retrieveMono(org.springframework.core.ParameterizedTypeReference<T> dataTypeRef)

Variant of `retrieveMono(Class)` for when the dataType has to have a generic type. See `ParameterizedTypeReference`.

#### retrieveFlux

    <T> reactor.core.publisher.Flux<T> retrieveFlux(Class<T> dataType)

Perform an `requestStream` or a `requestChannel` exchange depending on whether the request input is single or multi-payload.

If the return type is `Flux<Void>`, the `Flux` will 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

    <T> reactor.core.publisher.Flux<T> retrieveFlux(org.springframework.core.ParameterizedTypeReference<T> dataTypeRef)

Variant of `retrieveFlux(Class)` for when the dataType has to have a generic type. See `ParameterizedTypeReference`.