public static interface RSocketRequester.RequestSpec
| Modifier and Type | Method and Description |
|---|---|
RSocketRequester.ResponseSpec |
data(Object data)
Provide request payload data.
|
<T,P extends org.reactivestreams.Publisher<T>> |
data(P publisher,
Class<T> dataType)
Provide a
Publisher of value(s) for request payload data. |
<T,P extends org.reactivestreams.Publisher<T>> |
data(P publisher,
ParameterizedTypeReference<T> dataTypeRef)
Variant of
data(Publisher, Class) for when the dataType has
to have a generic type. |
RSocketRequester.ResponseSpec data(Object data)
Publisher of values, or another async type that's
registered in the configured ReactiveAdapterRegistry.
For multivalued Publishers, prefer using
data(Publisher, Class) or
data(Publisher, ParameterizedTypeReference) since that makes
it possible to find a compatible Encoder up front vs looking
it up on every value.
data - the Object to use for payload data<T,P extends org.reactivestreams.Publisher<T>> RSocketRequester.ResponseSpec data(P publisher, Class<T> dataType)
Publisher of value(s) for request payload data.
Publisher semantics determined through the configured
ReactiveAdapterRegistry influence which of the 4 RSocket
interactions to use. Publishers with unknown semantics are treated
as multivalued. Consider registering a reactive type adapter, or
passing Mono.from(publisher).
If the publisher completes empty, possibly Publisher<Void>,
the request will have an empty data Payload.
T - the type of element valuesP - the type of publisherpublisher - source of payload data value(s)dataType - the type of values to be published<T,P extends org.reactivestreams.Publisher<T>> RSocketRequester.ResponseSpec data(P publisher, ParameterizedTypeReference<T> dataTypeRef)
data(Publisher, Class) for when the dataType has
to have a generic type. See ParameterizedTypeReference.