Class DefaultServerCodecConfigurer
java.lang.Object
org.springframework.http.codec.support.DefaultServerCodecConfigurer
- All Implemented Interfaces:
CodecConfigurer
,ServerCodecConfigurer
Default implementation of
ServerCodecConfigurer
.- Since:
- 5.0
- Author:
- Rossen Stoyanchev
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.http.codec.CodecConfigurer
CodecConfigurer.CustomCodecs, CodecConfigurer.DefaultCodecConfig, CodecConfigurer.DefaultCodecs
Nested classes/interfaces inherited from interface org.springframework.http.codec.ServerCodecConfigurer
ServerCodecConfigurer.ServerDefaultCodecs
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.springframework.http.codec.support.BaseCodecConfigurer.DefaultCustomCodecs
protected final org.springframework.http.codec.support.BaseDefaultCodecs
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Create a copy of thisCodecConfigurer
.protected org.springframework.http.codec.support.BaseDefaultCodecs
Subclasses should override this to create a deep copy ofBaseDefaultCodecs
which can be client or server specific.Register custom HTTP message readers or writers in addition to the ones registered by default.Provides a way to customize or replace HTTP message readers and writers registered by default.Obtain the configured HTTP message readers.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 viaCodecConfigurer.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.CodecConfigurer
customCodecs, getReaders, getWriters, registerDefaults
-
Field Details
-
defaultCodecs
protected final org.springframework.http.codec.support.BaseDefaultCodecs defaultCodecs -
customCodecs
protected final org.springframework.http.codec.support.BaseCodecConfigurer.DefaultCustomCodecs customCodecs
-
-
Constructor Details
-
DefaultServerCodecConfigurer
public DefaultServerCodecConfigurer()
-
-
Method Details
-
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 interfaceCodecConfigurer
- Specified by:
defaultCodecs
in interfaceServerCodecConfigurer
- See Also:
-
clone
Description copied from interface:CodecConfigurer
Create a copy of thisCodecConfigurer
. 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 interfaceCodecConfigurer
- Specified by:
clone
in interfaceServerCodecConfigurer
-
cloneDefaultCodecs
protected org.springframework.http.codec.support.BaseDefaultCodecs cloneDefaultCodecs()Subclasses should override this to create a deep copy ofBaseDefaultCodecs
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 viaCodecConfigurer.customCodecs()
.By default this is set to
"true"
in which case default registrations are made; setting this tofalse
disables default registrations.- Specified by:
registerDefaults
in interfaceCodecConfigurer
-
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 interfaceCodecConfigurer
-
getReaders
Description copied from interface:CodecConfigurer
Obtain the configured HTTP message readers.- Specified by:
getReaders
in interfaceCodecConfigurer
-
getWriters
Description copied from interface:CodecConfigurer
Obtain the configured HTTP message writers.- Specified by:
getWriters
in interfaceCodecConfigurer
-