org.springframework.http.codec.support

## Class DefaultClientCodecConfigurer

- java.lang.Object
- - org.springframework.http.codec.support.DefaultClientCodecConfigurer

- All Implemented Interfaces:
    ClientCodecConfigurer, CodecConfigurer

      public class DefaultClientCodecConfigurer
      extends Object
      implements ClientCodecConfigurer

  Default implementation of `ClientCodecConfigurer`.
  Since:
    5.0
  Author:
    Rossen Stoyanchev

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `org.springframework.http.codec.support.BaseCodecConfigurer.DefaultCustomCodecs` Default implementation of `CustomCodecs`.

    - ### Nested classes/interfaces inherited from interface org.springframework.http.codec.ClientCodecConfigurer

      `ClientCodecConfigurer.ClientDefaultCodecs, ClientCodecConfigurer.MultipartCodecs`

    - ### Nested classes/interfaces inherited from interface org.springframework.http.codec.CodecConfigurer

      `CodecConfigurer.CustomCodecs, CodecConfigurer.DefaultCodecConfig, CodecConfigurer.DefaultCodecs`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.springframework.http.codec.support.BaseCodecConfigurer.DefaultCustomCodecs` | `customCodecs`
    `protected org.springframework.http.codec.support.BaseDefaultCodecs` | `defaultCodecs`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultClientCodecConfigurer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DefaultClientCodecConfigurer` | `clone()` Create a copy of this `CodecConfigurer`.
    `protected org.springframework.http.codec.support.BaseDefaultCodecs` | `cloneDefaultCodecs()` Subclasses should override this to create a deep copy of `BaseDefaultCodecs` which can be client or server specific.
    `CodecConfigurer.CustomCodecs` | `customCodecs()` Register custom HTTP message readers or writers in addition to the ones registered by default.
    `ClientCodecConfigurer.ClientDefaultCodecs` | `defaultCodecs()` Provides a way to customize or replace HTTP message readers and writers registered by default.
    `List<HttpMessageReader<?>>` | `getReaders()` Obtain the configured HTTP message readers.
    `List<HttpMessageWriter<?>>` | `getWriters()` Obtain the configured HTTP message writers.
    `void` | `registerDefaults(boolean shouldRegister)` Provides a way to completely turn off registration of default HTTP message readers and writers, and instead rely only on the ones provided via `CodecConfigurer.customCodecs()`.

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

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

    - ### Methods inherited from interface org.springframework.http.codec.ClientCodecConfigurer

      `create`

    - ### Methods inherited from interface org.springframework.http.codec.CodecConfigurer

      `customCodecs, getReaders, getWriters, registerDefaults`

- - ### Field Detail

    - #### defaultCodecs

          protected final org.springframework.http.codec.support.BaseDefaultCodecs defaultCodecs

    - #### customCodecs

          protected final org.springframework.http.codec.support.BaseCodecConfigurer.DefaultCustomCodecs customCodecs

  - ### Constructor Detail

    - #### DefaultClientCodecConfigurer

          public DefaultClientCodecConfigurer()

  - ### Method Detail

    - #### defaultCodecs

          public ClientCodecConfigurer.ClientDefaultCodecs defaultCodecs()

      Description copied from interface: `CodecConfigurer`
      Provides a way to customize or replace HTTP message readers and writers registered by default.
      Specified by:
        `defaultCodecs` in interface `ClientCodecConfigurer`
      Specified by:
        `defaultCodecs` in interface `CodecConfigurer`
      See Also:
        `CodecConfigurer.registerDefaults(boolean)`

    - #### clone

          public DefaultClientCodecConfigurer clone()

      Description copied from interface: `CodecConfigurer`
      Create a copy of this `CodecConfigurer`. The returned clone has its own lists of default and custom codecs and generally can be configured independently. Keep in mind however that codec instances (if any are configured) are themselves not cloned.
      Specified by:
        `clone` in interface `ClientCodecConfigurer`
      Specified by:
        `clone` in interface `CodecConfigurer`

    - #### cloneDefaultCodecs

          protected org.springframework.http.codec.support.BaseDefaultCodecs cloneDefaultCodecs()

      Subclasses should override this to create a deep copy of `BaseDefaultCodecs` which can be client or server specific.

    - #### registerDefaults

          public void registerDefaults(boolean shouldRegister)

      Description copied from interface: `CodecConfigurer`
      Provides a way to completely turn off registration of default HTTP message readers and writers, and instead rely only on the ones provided via `CodecConfigurer.customCodecs()`.

      By default this is set to `"true"` in which case default registrations are made; setting this to `false` disables default registrations.

      Specified by:
        `registerDefaults` in interface `CodecConfigurer`

    - #### customCodecs

          public CodecConfigurer.CustomCodecs customCodecs()

      Description copied from interface: `CodecConfigurer`
      Register custom HTTP message readers or writers in addition to the ones registered by default.
      Specified by:
        `customCodecs` in interface `CodecConfigurer`

    - #### getReaders

          public List<HttpMessageReader<?>> getReaders()

      Description copied from interface: `CodecConfigurer`
      Obtain the configured HTTP message readers.
      Specified by:
        `getReaders` in interface `CodecConfigurer`

    - #### getWriters

          public List<HttpMessageWriter<?>> getWriters()

      Description copied from interface: `CodecConfigurer`
      Obtain the configured HTTP message writers.
      Specified by:
        `getWriters` in interface `CodecConfigurer`