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 Details

    • metadata

      Append additional metadata entries through a Consumer. 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 a metadataPush.
      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 via ReactiveAdapterRegistry
      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 of 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.
      Parameters:
      producer - the source of payload data value(s). This must be a Publisher or another producer adaptable to a Publisher via ReactiveAdapterRegistry
      elementClass - the type of values to be produced
      Returns:
      spec to declare the expected response
    • data

      RSocketRequester.RetrieveSpec data(Object producer, org.springframework.core.ParameterizedTypeReference<?> elementTypeRef)
      Variant of data(Object, Class) for when the type hint has to have a generic type. See ParameterizedTypeReference.
      Parameters:
      producer - the source of payload data value(s). This must be a Publisher or another producer adaptable to a Publisher via ReactiveAdapterRegistry
      elementTypeRef - the type of values to be produced
      Returns:
      spec to declare the expected response