public class DefaultClientCodecConfigurer extends Object implements ClientCodecConfigurer
ClientCodecConfigurer
.Modifier and Type | Class and Description |
---|---|
protected static class |
org.springframework.http.codec.support.BaseCodecConfigurer.DefaultCustomCodecs
Default implementation of
CustomCodecs . |
ClientCodecConfigurer.ClientDefaultCodecs, ClientCodecConfigurer.MultipartCodecs
CodecConfigurer.CustomCodecs, CodecConfigurer.DefaultCodecConfig, CodecConfigurer.DefaultCodecs
Modifier and Type | Field and Description |
---|---|
protected org.springframework.http.codec.support.BaseCodecConfigurer.DefaultCustomCodecs |
customCodecs |
protected boolean |
customCodecsInitialized |
protected org.springframework.http.codec.support.BaseDefaultCodecs |
defaultCodecs |
Constructor and Description |
---|
DefaultClientCodecConfigurer() |
Modifier and Type | Method and Description |
---|---|
DefaultClientCodecConfigurer |
clone()
Create a copy of this
CodecConfigurer . |
protected org.springframework.http.codec.support.BaseDefaultCodecs |
cloneDefaultCodecs()
Sub-classes should override this to create deep copy of
BaseDefaultCodecs which can 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.
|
protected List<HttpMessageWriter<?>> |
getWritersInternal(boolean forMultipart)
Internal method that returns the configured 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() . |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create
customCodecs, getReaders, getWriters, registerDefaults
protected boolean customCodecsInitialized
protected final org.springframework.http.codec.support.BaseDefaultCodecs defaultCodecs
protected final org.springframework.http.codec.support.BaseCodecConfigurer.DefaultCustomCodecs customCodecs
public ClientCodecConfigurer.ClientDefaultCodecs defaultCodecs()
CodecConfigurer
defaultCodecs
in interface ClientCodecConfigurer
defaultCodecs
in interface CodecConfigurer
CodecConfigurer.registerDefaults(boolean)
public DefaultClientCodecConfigurer clone()
CodecConfigurer
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.clone
in interface ClientCodecConfigurer
clone
in interface CodecConfigurer
protected org.springframework.http.codec.support.BaseDefaultCodecs cloneDefaultCodecs()
BaseDefaultCodecs
which can can be client or server specific.public void registerDefaults(boolean shouldRegister)
CodecConfigurer
CodecConfigurer.customCodecs()
.
By default this is set to "true"
in which case default
registrations are made; setting this to false
disables default
registrations.
registerDefaults
in interface CodecConfigurer
public CodecConfigurer.CustomCodecs customCodecs()
CodecConfigurer
customCodecs
in interface CodecConfigurer
public List<HttpMessageReader<?>> getReaders()
CodecConfigurer
getReaders
in interface CodecConfigurer
public List<HttpMessageWriter<?>> getWriters()
CodecConfigurer
getWriters
in interface CodecConfigurer
protected List<HttpMessageWriter<?>> getWritersInternal(boolean forMultipart)
forMultipart
- whether to returns writers for general use ("false"),
or for multipart requests only ("true"). Generally the two sets are the
same except for the multipart writer itself.