Top Description Inners Methods
org.springframework.web.reactive.function.client

public Interface ExchangeStrategies

Known Direct Implementers
org.springframework.web.reactive.function.client.DefaultExchangeStrategiesBuilder.DefaultExchangeStrategies
Imports
java.util.List, java.util.function.Consumer, org.springframework.http.codec.ClientCodecConfigurer, .HttpMessageReader, .HttpMessageWriter

Provides strategies for use in an ExchangeFunction.

To create an instance, see the static methods withDefaults(), builder(), and empty().

Authors
Brian Clozel, Arjen Poutsma
Since
5.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Method Summary

Modifier and TypeMethod and Description
public static ExchangeStrategies.Builder
builder()

Return a builder pre-configured with default configuration to start.

public static ExchangeStrategies.Builder
empty()

Return a builder with empty configuration to start.

public List<HttpMessageReader<?>>

Returns:

the message readers
messageReaders
()

Return HttpMessageReaders to read and decode the response body with.

public List<HttpMessageWriter<?>>

Returns:

the message writers
messageWriters
()

Return HttpMessageWriters to write and encode the request body with.

public default ExchangeStrategies.Builder
mutate()

Return a builder to create a new ExchangeStrategies instance replicated from the current instance.

public static ExchangeStrategies
withDefaults()

Return an ExchangeStrategies instance with default configuration provided by ClientCodecConfigurer.

Method Detail

builderback to summary
public static ExchangeStrategies.Builder builder()

Return a builder pre-configured with default configuration to start. This is the same as withDefaults() but returns a mutable builder for further customizations.

emptyback to summary
public static ExchangeStrategies.Builder empty()

Return a builder with empty configuration to start.

messageReadersback to summary
public List<HttpMessageReader<?>> messageReaders()

Return HttpMessageReaders to read and decode the response body with.

Returns:List<HttpMessageReader<?>>

the message readers

messageWritersback to summary
public List<HttpMessageWriter<?>> messageWriters()

Return HttpMessageWriters to write and encode the request body with.

Returns:List<HttpMessageWriter<?>>

the message writers

mutateback to summary
public default ExchangeStrategies.Builder mutate()

Return a builder to create a new ExchangeStrategies instance replicated from the current instance.

Since
5.1.12
withDefaultsback to summary
public static ExchangeStrategies withDefaults()

Return an ExchangeStrategies instance with default configuration provided by ClientCodecConfigurer.

org.springframework.web.reactive.function.client back to summary

public Interface ExchangeStrategies.Builder

Known Direct Implementers
org.springframework.web.reactive.function.client.DefaultExchangeStrategiesBuilder

A mutable builder for an ExchangeStrategies.

Method Summary

Modifier and TypeMethod and Description
public ExchangeStrategies

Returns:

the built strategies
build
()

Builds the ExchangeStrategies.

public ExchangeStrategies.Builder

Returns:

this builder
codecs
(Consumer<ClientCodecConfigurer>
the consumer to customize the codecs
consumer
)

Customize the list of client-side HTTP message readers and writers.

Method Detail

buildback to summary
public ExchangeStrategies build()

Builds the ExchangeStrategies.

Returns:ExchangeStrategies

the built strategies

codecsback to summary
public ExchangeStrategies.Builder codecs(Consumer<ClientCodecConfigurer> consumer)

Customize the list of client-side HTTP message readers and writers.

Parameters
consumer:Consumer<ClientCodecConfigurer>

the consumer to customize the codecs

Returns:ExchangeStrategies.Builder

this builder