Package org.springframework.web.service.invoker

# Class ReactiveHttpRequestValues.Builder

java.lang.Object
org.springframework.web.service.invoker.HttpRequestValues.Builder
org.springframework.web.service.invoker.ReactiveHttpRequestValues.Builder

All Implemented Interfaces:
  `HttpRequestValues.Metadata`

Enclosing class:
  ReactiveHttpRequestValues

public static final class ReactiveHttpRequestValues.Builder extends HttpRequestValues.Builder
Builder for `ReactiveHttpRequestValues`.

## Constructor Summary

Constructors
Constructor
Description
`Builder()`

## Method Summary

Modifier and Type
Method
Description
`ReactiveHttpRequestValues.Builder`
`addAttribute(String name, Object value)`
Configure an attribute to associate with the request.
`ReactiveHttpRequestValues.Builder`
`addCookie(String name, String... values)`
Add the given cookie name and values.
`ReactiveHttpRequestValues.Builder`
`addHeader(String headerName, String... headerValues)`
Add the given header name and values.
`ReactiveHttpRequestValues.Builder`
`addRequestParameter(String name, String... values)`
Add the given request parameter name and values.
`ReactiveHttpRequestValues.Builder`
`addRequestPart(String name, Object part)`
Add a part to a multipart request.
`<T, P extends Publisher<T>>
ReactiveHttpRequestValues.Builder`
`addRequestPartPublisher(String name, P publisher, org.springframework.core.ParameterizedTypeReference<T> elementTye)`
Variant of `addRequestPart(String, Object)` that allows the part value to be produced by a `Publisher`.
`ReactiveHttpRequestValues`
`build()`
Build the `HttpRequestValues` instance.
`protected Object`
`buildMultipartBody()`
`protected ReactiveHttpRequestValues`
`createRequestValues(HttpMethod httpMethod, URI uri, UriBuilderFactory uriBuilderFactory, String uriTemplate, Map<String,String> uriVars, HttpHeaders headers, org.springframework.util.MultiValueMap<String,String> cookies, Map<String,Object> attributes, Object bodyValue)`
Create `HttpRequestValues` from values passed to the `HttpRequestValues.Builder`.
`protected boolean`
`hasBody()`
`protected boolean`
`hasParts()`
`ReactiveHttpRequestValues.Builder`
`setAccept(List<MediaType> acceptableMediaTypes)`
Set the media types for the request `Accept` header.
`<T, P extends Publisher<T>>
void`
`setBodyPublisher(P body, org.springframework.core.ParameterizedTypeReference<T> elementTye)`
Set the request body as a Reactive Streams `Publisher`.
`void`
`setBodyValue(Object bodyValue)`
Set the request body as an Object to be serialized.
`ReactiveHttpRequestValues.Builder`
`setContentType(MediaType contentType)`
Set the media type for the request `Content-Type` header.
`ReactiveHttpRequestValues.Builder`
`setHttpMethod(HttpMethod httpMethod)`
Set the HTTP method for the request.
`ReactiveHttpRequestValues.Builder`
`setUri(URI uri)`
Set the URL to use.
`ReactiveHttpRequestValues.Builder`
`setUriBuilderFactory(UriBuilderFactory uriBuilderFactory)`
Set the `UriBuilderFactory` that will be used to expand the `HttpRequestValues.Builder.getUriTemplate()`.
`ReactiveHttpRequestValues.Builder`
`setUriTemplate(String uriTemplate)`
Set the request URL as a String template.
`ReactiveHttpRequestValues.Builder`
`setUriVariable(String name, String value)`
Add a URI variable name-value pair.

### Methods inherited from class org.springframework.web.service.invoker.HttpRequestValues.Builder

`getAcceptMediaTypes, getContentType, getHttpMethod, getUriTemplate, setBodyValue`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Builder

public Builder()

## Method Details

### setHttpMethod

public ReactiveHttpRequestValues.Builder setHttpMethod(HttpMethod httpMethod)
Description copied from class: `HttpRequestValues.Builder`
Set the HTTP method for the request.

Overrides:
  `setHttpMethod` in class `HttpRequestValues.Builder`

### setUri

public ReactiveHttpRequestValues.Builder setUri(URI uri)
Description copied from class: `HttpRequestValues.Builder`
Set the URL to use. When set, this overrides the URI template from the `HttpExchange` annotation.

Overrides:
  `setUri` in class `HttpRequestValues.Builder`

### setUriBuilderFactory

public ReactiveHttpRequestValues.Builder setUriBuilderFactory(@Nullable UriBuilderFactory uriBuilderFactory)
Description copied from class: `HttpRequestValues.Builder`
Set the `UriBuilderFactory` that will be used to expand the `HttpRequestValues.Builder.getUriTemplate()`.

Overrides:
  `setUriBuilderFactory` in class `HttpRequestValues.Builder`

### setUriTemplate

public ReactiveHttpRequestValues.Builder setUriTemplate(String uriTemplate)
Description copied from class: `HttpRequestValues.Builder`
Set the request URL as a String template.

Overrides:
  `setUriTemplate` in class `HttpRequestValues.Builder`

### setUriVariable

public ReactiveHttpRequestValues.Builder setUriVariable(String name, String value)
Description copied from class: `HttpRequestValues.Builder`
Add a URI variable name-value pair.

Overrides:
  `setUriVariable` in class `HttpRequestValues.Builder`

### setAccept

public ReactiveHttpRequestValues.Builder setAccept(List<MediaType> acceptableMediaTypes)
Description copied from class: `HttpRequestValues.Builder`
Set the media types for the request `Accept` header.

Overrides:
  `setAccept` in class `HttpRequestValues.Builder`

### setContentType

public ReactiveHttpRequestValues.Builder setContentType(MediaType contentType)
Description copied from class: `HttpRequestValues.Builder`
Set the media type for the request `Content-Type` header.

Overrides:
  `setContentType` in class `HttpRequestValues.Builder`

### addHeader

public ReactiveHttpRequestValues.Builder addHeader(String headerName, String... headerValues)
Description copied from class: `HttpRequestValues.Builder`
Add the given header name and values.

Overrides:
  `addHeader` in class `HttpRequestValues.Builder`

### addCookie

public ReactiveHttpRequestValues.Builder addCookie(String name, String... values)
Description copied from class: `HttpRequestValues.Builder`
Add the given cookie name and values.

Overrides:
  `addCookie` in class `HttpRequestValues.Builder`

### addRequestParameter

public ReactiveHttpRequestValues.Builder addRequestParameter(String name, String... values)
Description copied from class: `HttpRequestValues.Builder`
Add the given request parameter name and values.

When `"content-type"` is set to `"application/x-www-form-urlencoded"`, request parameters are encoded in the request body. Otherwise, they are added as URL query parameters.

Overrides:
  `addRequestParameter` in class `HttpRequestValues.Builder`

### addAttribute

public ReactiveHttpRequestValues.Builder addAttribute(String name, Object value)
Description copied from class: `HttpRequestValues.Builder`
Configure an attribute to associate with the request.

Overrides:
  `addAttribute` in class `HttpRequestValues.Builder`
Parameters:
  `name` - the attribute name
  `value` - the attribute value

### addRequestPart

public ReactiveHttpRequestValues.Builder addRequestPart(String name, Object part)
Add a part to a multipart request. The part value may be as described in `MultipartBodyBuilder.part(String, Object)`.

Overrides:
  `addRequestPart` in class `HttpRequestValues.Builder`

### addRequestPartPublisher

public <T, P extends Publisher<T>> ReactiveHttpRequestValues.Builder addRequestPartPublisher(String name, P publisher, org.springframework.core.ParameterizedTypeReference<T> elementTye)
Variant of `addRequestPart(String, Object)` that allows the part value to be produced by a `Publisher`.

### setBodyValue

public void setBodyValue(@Nullable Object bodyValue)
Set the request body as an Object to be serialized.

This is mutually exclusive with and resets any previously set body publisher.

Overrides:
  `setBodyValue` in class `HttpRequestValues.Builder`

### setBodyPublisher

public <T, P extends Publisher<T>> void setBodyPublisher(P body, org.springframework.core.ParameterizedTypeReference<T> elementTye)
Set the request body as a Reactive Streams `Publisher`.

This is mutually exclusive with and resets any previously set body value.

### build

public ReactiveHttpRequestValues build()
Description copied from class: `HttpRequestValues.Builder`
Build the `HttpRequestValues` instance.

Overrides:
  `build` in class `HttpRequestValues.Builder`

### hasParts

protected boolean hasParts()

Overrides:
  `hasParts` in class `HttpRequestValues.Builder`

### hasBody

protected boolean hasBody()

Overrides:
  `hasBody` in class `HttpRequestValues.Builder`

### buildMultipartBody

protected Object buildMultipartBody()

Overrides:
  `buildMultipartBody` in class `HttpRequestValues.Builder`

### createRequestValues

protected ReactiveHttpRequestValues createRequestValues(@Nullable HttpMethod httpMethod, @Nullable URI uri, @Nullable UriBuilderFactory uriBuilderFactory, @Nullable String uriTemplate, Map<String,String> uriVars, HttpHeaders headers, org.springframework.util.MultiValueMap<String,String> cookies, Map<String,Object> attributes, @Nullable Object bodyValue)
Description copied from class: `HttpRequestValues.Builder`
Create `HttpRequestValues` from values passed to the `HttpRequestValues.Builder`.

Overrides:
  `createRequestValues` in class `HttpRequestValues.Builder`