public interface CodecConfigurer
ClientCodecConfigurer.create()
or
ServerCodecConfigurer.create()
to create an instance.
defaultCodecs()
to customize HTTP message readers or writers
registered by default.
customCodecs()
to add custom HTTP message readers or writers.
getReaders()
and getWriters()
to obtain the list of
configured HTTP message readers and writers.
HTTP message readers and writers are divided into 3 categories that are ordered as follows:
Typed and object readers are further sub-divided and ordered as follows:
Modifier and Type | Interface and Description |
---|---|
static interface |
CodecConfigurer.CustomCodecs
Registry for custom HTTP message readers and writers.
|
static interface |
CodecConfigurer.DefaultCodecConfig
Exposes the values of properties configured through
defaultCodecs() that are applied to default codecs. |
static interface |
CodecConfigurer.DefaultCodecs
Customize or replace the HTTP message readers and writers registered by
default.
|
Modifier and Type | Method and Description |
---|---|
CodecConfigurer |
clone()
Create a copy of this
CodecConfigurer . |
CodecConfigurer.CustomCodecs |
customCodecs()
Register custom HTTP message readers or writers in addition to the ones
registered by default.
|
CodecConfigurer.DefaultCodecs |
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 registerDefaults)
Provides a way to completely turn off registration of default HTTP message
readers and writers, and instead rely only on the ones provided via
customCodecs() . |
CodecConfigurer.DefaultCodecs defaultCodecs()
registerDefaults(boolean)
CodecConfigurer.CustomCodecs customCodecs()
void registerDefaults(boolean registerDefaults)
customCodecs()
.
By default this is set to "true"
in which case default
registrations are made; setting this to false
disables default
registrations.
List<HttpMessageReader<?>> getReaders()
List<HttpMessageWriter<?>> getWriters()
CodecConfigurer clone()
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.