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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RSocketRequester.RetrieveSpec
data(Object data)
Provide payload data for the request.RSocketRequester.RetrieveSpec
data(Object producer, Class<?> elementClass)
Variant ofdata(Object)
that also accepts a hint for the types of values that will be produced.RSocketRequester.RetrieveSpec
data(Object producer, ParameterizedTypeReference<?> elementTypeRef)
Variant ofdata(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 aConsumer
.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 Detail
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.
data
RSocketRequester.RetrieveSpec data(Object 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
RSocketRequester.RetrieveSpec data(Object producer, Class<?> elementClass)
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
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 aPublisher
or another producer adaptable to aPublisher
viaReactiveAdapterRegistry
elementTypeRef
- the type of values to be produced- Returns:
- spec to declare the expected response