public class DefaultServerCodecConfigurer extends Object implements ServerCodecConfigurer
ServerCodecConfigurer
.Modifier and Type | Class and Description |
---|---|
protected static class |
org.springframework.http.codec.support.BaseCodecConfigurer.DefaultCustomCodecs
Default implementation of
CustomCodecs . |
ServerCodecConfigurer.ServerDefaultCodecs
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 |
---|
DefaultServerCodecConfigurer() |
Modifier and Type | Method and Description |
---|---|
DefaultServerCodecConfigurer |
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.
|
ServerCodecConfigurer.ServerDefaultCodecs |
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 ServerCodecConfigurer.ServerDefaultCodecs defaultCodecs()
CodecConfigurer
defaultCodecs
in interface CodecConfigurer
defaultCodecs
in interface ServerCodecConfigurer
CodecConfigurer.registerDefaults(boolean)
public DefaultServerCodecConfigurer 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 CodecConfigurer
clone
in interface ServerCodecConfigurer
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.