public static interface RSocketRequester.RequestSpec extends RSocketRequester.MetadataSpec<RSocketRequester.RequestSpec>
| Modifier and Type | Method and Description |
|---|---|
RSocketRequester.RequestSpec |
data(Object data)
Provide payload data for the request.
|
RSocketRequester.RequestSpec |
data(Object producer,
Class<?> elementClass)
Variant of
data(Object) that also accepts a hint for the
types of values that will be produced. |
RSocketRequester.RequestSpec |
data(Object producer,
ParameterizedTypeReference<?> elementTypeRef)
Variant of
data(Object, Class) for when the type hint has
to have a generic type. |
RSocketRequester.RequestSpec |
metadata(Consumer<RSocketRequester.MetadataSpec<?>> configurer)
Append additional metadata entries through a
Consumer. |
<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(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(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. |
metadataRSocketRequester.RequestSpec metadata(Consumer<RSocketRequester.MetadataSpec<?>> configurer)
Consumer.
This enables libraries such as Spring Security to provide shortcuts
for applying a set of customizations.configurer - the configurer to applyIllegalArgumentException - if not using composite metadata.RSocketRequester.RequestSpec data(Object data)
Publisher of value(s)
Publisher via ReactiveAdapterRegistry
data - the Object value for the payload dataRSocketRequester.RequestSpec data(Object producer, Class<?> elementClass)
data(Object) that also accepts a hint for the
types of values that will be produced. The class hint is used to
find a compatible Encoder once, up front vs per value.producer - the source of payload data value(s). This must be a
Publisher or another producer adaptable to a
Publisher via ReactiveAdapterRegistryelementClass - the type of values to be producedRSocketRequester.RequestSpec data(Object producer, ParameterizedTypeReference<?> elementTypeRef)
data(Object, Class) for when the type hint has
to have a generic type. See ParameterizedTypeReference.producer - the source of payload data value(s). This must be a
Publisher or another producer adaptable to a
Publisher via ReactiveAdapterRegistryelementTypeRef - the type of values to be producedreactor.core.publisher.Mono<Void> send()
fireAndForget.<T> reactor.core.publisher.Mono<T> retrieveMono(Class<T> dataType)
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.
T - parameter for the expected data typedataType - the expected data type for the response<T> reactor.core.publisher.Mono<T> retrieveMono(ParameterizedTypeReference<T> dataTypeRef)
retrieveMono(Class) for when the dataType has
to have a generic type. See ParameterizedTypeReference.<T> reactor.core.publisher.Flux<T> retrieveFlux(Class<T> dataType)
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.
T - parameterize the expected type of valuesdataType - the expected type for values in the response<T> reactor.core.publisher.Flux<T> retrieveFlux(ParameterizedTypeReference<T> dataTypeRef)
retrieveFlux(Class) for when the dataType has
to have a generic type. See ParameterizedTypeReference.