org.springframework.messaging.rsocket

## 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 and Description
    --- | ---
    `RSocketRequester.RetrieveSpec` | `data(Object data)` Provide payload data for the request.
    `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.
    `RSocketRequester.RetrieveSpec` | `data(Object producer, ParameterizedTypeReference<?> elementTypeRef)` Variant of `data(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 a `Consumer`.
    `reactor.core.publisher.Mono<Void>` | `sendMetadata()` Perform a `metadataPush`.

    - ### 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 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

          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` 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,
                                             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