Interface RsocketRequester.Requestspec
- All superinterfaces:
RsocketRequester.Metadataspec<RsocketRequester.Requestspec>, RsocketRequester.Retrievespec
- Enclosing interface:
RsocketRequester
public static interface RsocketRequester.Requestspec
extends RsocketRequester.Metadataspec<RsocketRequester.Requestspec>, RsocketRequester.Retrievespec
spec to declare the input for an Rsocket request.
- since:
- 5.2
- Author:
- Rossen stoyanchev, Brian Clozel
-
Method summary
Modifier and TypeMethodDescriptionProvide payload data for the request.Variant ofdata(Object)that also accepts a hint for the types of values that will be produced.data(Object producer, ParameterizedTypeReference<?> elementTypeRef) Variant ofdata(Object, Class)for when the type hint has to have a generic type.metadata(Consumer<RsocketRequester.Metadataspec<?>> configurer) Append additional metadata entries through aConsumer.reactor.core.publisher.Mono<Void> Perform ametadataPush.Methods inherited from interface RsocketRequester.Metadataspec
metadataMethods inherited from interface RsocketRequester.Retrievespec
retrieveFlux, retrieveFlux, retrieveMono, retrieveMono, send
-
Method Details
-
metadata
RsocketRequester.Requestspec metadata(Consumer<RsocketRequester.Metadataspec<?>> configurer) Append additional metadata entries through aConsumer. This enables libraries such as spring security to provide shortcuts for applying a set of customizations.- Parameters:
configurer- the configurer to apply- Throws:
IllegalArgumentException- if not using composite metadata.
-
sendMetadata
-
data
Provide payload data for the request. This can be one of:- Concrete value
Publisherof value(s)- Any other producer of value(s) that can be adapted to a
PublisherviaReactiveAdapterRegistry
- Parameters:
data- the Object value for the payload data- Returns:
- spec to declare the expected response
-
data
Variant ofdata(Object)that also accepts a hint for the types of values that will be produced. The class hint is used to find a compatibleEncoderonce, up front vs per value.- Parameters:
producer- the source of payload data value(s). This must be aPublisheror another producer adaptable to aPublisherviaReactiveAdapterRegistryelementClass- the type of values to be produced- Returns:
- spec to declare the expected response
-
data
RsocketRequester.Retrievespec data(Object producer, ParameterizedTypeReference<?> elementTypeRef) Variant ofdata(Object, Class)for when the type hint has to have a generic type. seeParameterizedTypeReference.- Parameters:
producer- the source of payload data value(s). This must be aPublisheror another producer adaptable to aPublisherviaReactiveAdapterRegistryelementTypeRef- the type of values to be produced- Returns:
- spec to declare the expected response
-