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.
-
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 org.springframework.messaging.rsocket.RSocketRequester.MetadataSpec
metadata
Methods inherited from interface org.springframework.messaging.rsocket.RSocketRequester.RetrieveSpec
retrieveFlux, retrieveFlux, retrieveMono, retrieveMono, send
-
Method Details
-
metadata
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
reactor.core.publisher.Mono<Void> sendMetadata()Perform ametadataPush
.- Since:
- 5.3
-
data
Provide payload data for the request. This can be one of:- Concrete value
Publisher
of value(s)- Any other producer of value(s) that can be adapted to a
Publisher
viaReactiveAdapterRegistry
- 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 compatibleEncoder
once, up front vs per value.- Parameters:
producer
- the source of payload data value(s). This must be aPublisher
or another producer adaptable to aPublisher
viaReactiveAdapterRegistry
elementClass
- the type of values to be produced- Returns:
- spec to declare the expected response
-
data
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 aPublisher
or another producer adaptable to aPublisher
viaReactiveAdapterRegistry
elementTypeRef
- the type of values to be produced- Returns:
- spec to declare the expected response
-